mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-05 21:23:57 +00:00
LZipStream and disposal of original stream #759
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @manfred-brands on GitHub (Jan 19, 2026).
Originally assigned to: @adamhathcock, @Copilot on GitHub.
@adamhathcock PR #1113 changed the Disposal behaviour of LZipStream/BZip2Stream and broke my unit test which expected the stream to still be open.
Now there also is an inconsistency between the Compress and Decompress modes.
All other compression streams my library uses have a leaveOpen parameter.
Would it be possible to add an leaveOpen parameter to
LZipStreamandBZip2Stream?I could create a PR for this if you like.
@adamhathcock commented on GitHub (Jan 19, 2026):
Let's see what copilot does but PRs are always welcome
@adamhathcock commented on GitHub (Jan 19, 2026):
Does adding those parameters simply help you or are there further issues?
@manfred-brands commented on GitHub (Jan 19, 2026):
It would help.
At the moment I have to pass stream as
new NonDisposingStream(stream)whereNonDisposingStreamis a wrapper class with an emptyDisposemethod.