Closed Supegg closed 8 years ago
You're saying you want the option for sharpcompress to close the stream for you?
when destination is a filestream, it is ok. Sometimes destination is a MemoryStream, it will pass to a method for use. If closed after tar, it doesn't work.
You're right. I'm fixing this now: https://github.com/adamhathcock/sharpcompress/pull/138
i think the caller decides whether&when to dispose outputstream. so, i suggest public TarWriter(Stream destination, CompressionInfo compressionInfo, bool closeStream = true) : base(ArchiveType.Tar) public GZipWriter(Stream destination, bool closeStream = true) : base(ArchiveType.GZip) public ZipWriter(Stream destination, CompressionInfo compressionInfo, string zipComment, bool closeStream = true) : base(ArchiveType.Zip)
PS: why? OutputStream.Dispose(); // required when bzip2 compression is used