sharpcompress
sharpcompress copied to clipboard
Using Reader to extract Uncompressed Zips created in a Streaming manner
Samplecode.txt I have a zip file zipped by OneDrive. When i call the ExtractAllFiles method and i iterate through the files (the zip has 4 files) a EndOfStream Exception is thrown after the first entry.
I attached the File and some sampleCode to Test it with NUnit OneDrive.zip
It is a streamed file using no compression, it works in the latest version as far as I can see.
In the new version (0.32.0) this leads to a endless loop.
hopefully someone can take a look soon
https://www.nuget.org/packages/SharpCompress/0.32.1
Might have to revert this....logically, I'm not sure this is something to account for:
For an uncompressed file:
- we don't know where the file stream ends (compressed files we do, ironically, because the compression knows when it's done)
- and we don't have a size on a streaming file because it's in the trailer.
Because we don't search for DataDescriptors for not compressed streams or give reader info of sizes from DirectoryHeaders. Created #686 to fix/show where we need things
Did a small implementation for seeking non compressed streams, with some limitations... missing crc32 check, missing 64bit handling, but do check that skipped size matches.
still have a problem with nested non-compressed zips but I'm starting to look my patence for these kinds of issues. Scanning ahead for the post data descriptor all that can be done for now