leaveOpen argument for XZStream constructor #291

Closed
opened 2026-01-29 22:09:36 +00:00 by claunia · 4 comments
Owner

Originally created by @ied206 on GitHub (Apr 21, 2018).

While SharpCompress.Compressors classes like DeflateStream and BZip2Stream have leaveOpen argument in its constructor, XZStream and RarStream does not.

Is there any special reason for this? It would be better to have leaveOpen to every Stream in SharpCompress.Compressors, to match convention of System.IO.Compression.

Originally created by @ied206 on GitHub (Apr 21, 2018). While `SharpCompress.Compressors` classes like `DeflateStream` and `BZip2Stream` have `leaveOpen` argument in its constructor, `XZStream` and `RarStream` does not. Is there any special reason for this? It would be better to have `leaveOpen` to every Stream in `SharpCompress.Compressors`, to match convention of `System.IO.Compression`.
Author
Owner

@adamhathcock commented on GitHub (Apr 21, 2018):

No special reason other than just didn’t think about it.

Rather than implementing leaveOpen on each, I should remove it and use NonDisposingStream to wrap instead.

@adamhathcock commented on GitHub (Apr 21, 2018): No special reason other than just didn’t think about it. Rather than implementing `leaveOpen` on each, I should remove it and use `NonDisposingStream` to wrap instead.
Author
Owner

@adamhathcock commented on GitHub (Apr 22, 2018):

Fixing here: https://github.com/adamhathcock/sharpcompress/pull/369

@adamhathcock commented on GitHub (Apr 22, 2018): Fixing here: https://github.com/adamhathcock/sharpcompress/pull/369
Author
Owner

@ied206 commented on GitHub (May 5, 2018):

Thanks for fixing!

@ied206 commented on GitHub (May 5, 2018): Thanks for fixing!
Author
Owner

@amoraitis commented on GitHub (Jan 20, 2020):

Hi @adamhathcock, I am upgrading SharpCompress from 0.10.3 to the latest and I noticed that your removed leaveOpen parameter from BZip2Stream's and GZipStreams constructors. Should I add something to my implementation other than removing the leaveOpen parameter from the constructors?

@amoraitis commented on GitHub (Jan 20, 2020): Hi @adamhathcock, I am upgrading `SharpCompress` from `0.10.3` to the latest and I noticed that your removed `leaveOpen` parameter from `BZip2Stream`'s and `GZipStream`s constructors. Should I add something to my implementation other than removing the `leaveOpen` parameter from the constructors?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#291