void UpdateProgress (int n) { nwritten += n; if (Progress != null) Progress.Report (nwritten, totalSize); }