When using DotNetZip, is it possible to get what the final zip file size will be before calling Save(stream)? I have a application(Window Service) where package Stream size
not understand the answer
The answer is quite clear, but requires some fundamental understanding of compression. Take, for example, a look at LZW.
It comes down to this: a compression engine does not know the final size of the compressed data before compressing all the source data. And you'd rather not want to do that twice.
As explained in the documentation of dotnetzip, the compression only starts when calling ZipFile.Save().