mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Different results with ZipArchive.Open() & ReaderFactory.Open() #395
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 @Dem0n2die4 on GitHub (Apr 15, 2020).
Hello!
I have a strange situation. I use version 0.24.0.0
I try to read inner structure of zip archive. In first varian I manually check header of file and then move with:
and it works fine.
After that I tried to rewrite it to ReaderFactory in due to support rar archives:
in the result some files are missing.
Please tell me what I missed.
Thx for your time.
@adamhathcock commented on GitHub (Apr 15, 2020):
You can use ArchiveFactory if you really want to open regardless of archive.
ReaderFactory reads entries a different way than Archive so there could be bugs or your zip isn't made for seekable reading. Use ArchiveFactory unless you really need the case of non-seekable streams.
@Dem0n2die4 commented on GitHub (Apr 15, 2020):
Yep, thank you! Already found that way)
Can I ask you about seeking structure of rar5? I understand that this is a little bit off-topic.
Is it works fine? I tried code from and it works as good as need to.
@adamhathcock commented on GitHub (Apr 15, 2020):
RAR is simple header then data. Zip is usually way more complicated. I keep some format documentation in the repo.