SharpZipLib
SharpZipLib copied to clipboard
Add multistream support to BZip2
Fixes #413. Fixes #162.
I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.
(fixes #413 rather than 276?)
Gah. Github! Instead of using the number I actually typed, it auto-completed to the first search result that started with the number (413).
Not sure if this would be considered a real issue or not, but in case:
Does the usage of the Length property on the baseStream have any ramifications on the supported types of input stream?
Example: Say that I have a Zip file that contains a BZip2 file. With the current code I appear to be able to open a BZip2InputStream on the stream that is returned from ZipFile.GetInputStream and read the data from it, but with this change I get
System.NotSupportedException : InflaterInputStream Length is not supported
I'm not sure off hand is BZip2InputStream is inteded to support such streams though? (might possibly also happen if you tried it with a network stream or some such as well)
In which release this will be available?
This will probably be in the next release. I have been super busy and neglected this unfortunately. Hopefully I will get time this weekend to fix current issues.
@Numpsy I made suggestions that should make it compatible with non-seekable streams. It will not access Stream.Length if multistream
is not enabled, and it defaults to enable it only if the input stream supports seeking.