I have encountered an error during second call to Save(stream) method. Here is an example:
zip = new
// add some files
// Save to first stream
ms1 = new
// Try to save to another stream
ms2 = new
zip.Save(ms2); // here exception
The exception is of ZipException type with "Cannot read that as a ZipFile" message and with inner exception of NullReferenceException type with "Object reference not set to an instance of an object." message.
Generaly, I want to check zip size after adding each file. So I save zip to memory stream and check its length. This IMO is more elegant solution than saving to temporary files. Or perhaps, there is another way to check zip size?