When using ZipOutputStream and including a comment, ZipOutputStream will throw a NullReferenceException on disposal.
at Ionic.Zip.ZipOutput.GenCentralDirectoryFooter(Int64 StartOfCentralDirectory, Int64 EndOfCentralDirectory, Zip64Option zip64, Int32 entryCount, String comment, Encoding encoding)
at Ionic.Zip.ZipOutput.WriteCentralDirectoryStructure(Stream s, ICollection`1 entries, UInt32 numSegments, Zip64Option zip64, String comment, Encoding encoding)
at Ionic.Zip.ZipOutputStream.Dispose(Boolean notCalledFromFinalizer)
using (ZipOutputStream zipStream = new ZipOutputStream(OutputStream))
zipStream.CompressionLevel = Ionic.Zlib.CompressionLevel.None;
zipStream.Comment = "Cheeso is the man!";
//If you explicitly set UseUnicodeAsNecessary to false, the error no longer occurs.
//zipStream.UseUnicodeAsNecessary = false;
// .... Write to stream
} //ex is thrown here
The environment is a Windows XP Professional x86 installation.
I noticed ProvisionalAlternateEncoding is null, and am wondering if that's what's is causing the exception.
Thanks for all your work on this library.