Closed Brain2000 closed 5 years ago
I hope so. I merged all the changes into my fork, added this, then made the pull request. It's only my second pull requests, so perhaps I did it incorrectly or there is a better way to do it?
I took a peak at what GZipStream does; and that is implemented by DeflateStream, and that calls the following code on dispose: https://github.com/dotnet/corefx/blob/b8bc4ff80c5f7baa681e8a569d367356957ba78a/src/System.IO.Compression/src/System/IO/Compression/DeflateZLib/DeflateStream.cs#L585
In other words, if it's being finalized, there's no flushing, but if it's being disposed, there is flushing.
I think I'd consider that to be the expected behavior, if by nothing other than example.
@bp74 is this mergable?