Detect if 7zip file has data after payload #430

Closed
opened 2026-01-29 22:11:51 +00:00 by claunia · 3 comments
Owner

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:
image

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?

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: ![image](https://user-images.githubusercontent.com/450826/102905401-5ef56380-4473-11eb-91d8-41ee7782fb56.png) 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?
Author
Owner

@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!

@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!
Author
Owner

@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!

@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!
Author
Owner

@Louhike commented on GitHub (Dec 23, 2020):

That's ok, thanks for the help! I will take a look at it.

@Louhike commented on GitHub (Dec 23, 2020): That's ok, thanks for the help! I will take a look at it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#430