mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-06 13:34:58 +00:00
Detect if 7zip file has data after payload #430
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 @Louhike on GitHub (Dec 22, 2020).
I'm working on a tool (https://github.com/Louhike/Ugly-GDEmu-Games-Manager) where I want to analyze specific files in archives.
My problem is that when I use OpenEntryStream from an entry of a 7z file, it sometimes takes a lot of time.

It seems to happen specifically with archives with data after end of payload:
If I extract the content and create a new 7z file, OpenEntryStream isn't slow on its entries.
So I would like to bypass those files and warn the users. Can I do that with SharpCompress?
@Louhike commented on GitHub (Dec 22, 2020):
I can provide you with a code example and a 7z file if required.
It's a great library by the way, it's a delight to use it so thanks!
@adamhathcock commented on GitHub (Dec 22, 2020):
7zip is the most complex and my most disliked format.
If you dig into the format the code might do what you need. You probably can't do it from the higher level interface.
I'm unlikely to have time to help in any detail so apologizes!
@Louhike commented on GitHub (Dec 23, 2020):
That's ok, thanks for the help! I will take a look at it.