mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Calling SevenZipArchiveEntry.OpenEntryStream skips the same parts again and again when reading entries in order #385
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 @poizan42 on GitHub (Dec 4, 2019).
SevenZipFilePart.GetCompressedStream skips all the previous files in the Folder. This involves decompressing them and discarding the decompressed data. So when reading the content of the Entries in order we keep decompressing the same data that we have already decompressed for every subsequent entry in the same CFolder! May I suggest that the folder stream be cached, e. g. by only re-creating if we need to read an entry earlier in the folder than the last one, so we don't end up like Shlemiel the Painter.
@adamhathcock commented on GitHub (Dec 4, 2019):
7Zip is an awful format that wants files to be compressed in a continuous stream. If you’re grabbing the compressed stream directly there’s not the library can do to make things nice for you.
Perhaps your solution will work for you. Sounds like you have it under control.