spMACProgressHelper.UpdateStatus("Finishing compression");
// finalize the file
if (nTerminatingBytes.value > 0) spBuffer = new byte[nTerminatingBytes.value];
spInputSource.GetTerminatingData(spBuffer);
spAPECompress.Finish(spBuffer, nTerminatingBytes.value, nTerminatingBytes.value);
// update the progress to 100%
spMACProgressHelper.UpdateStatus("Compression finished");
} finally {