mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-07 21:22:04 +00:00
Extraction failes on freshly created zip, rar with winrar. #311
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 @naice on GitHub (Jul 3, 2018).
When I extract freshly generated archives (zip, rar) All I get are exceptions.
For the rar archive I get the RarCrcStream "file crc missmatch" exception when opening the compressed stream via OpenEntryStream() and call the Read from the stream.
For the zip archive I get an "Unknown header: 425723911" after extracting the first file and move on to next entry with MoveToNextEntry().
Do I missunderstand how this works, or are these bugs? I am using version 0.21.1.0
@adamhathcock commented on GitHub (Jul 3, 2018):
Try using some of the built-in extension methods for extracting to see if you get the same issue. https://github.com/adamhathcock/sharpcompress/blob/master/USAGE.md#extract-all-files-from-a-rar-file-to-a-directory-using-rararchive
@naice commented on GitHub (Jul 3, 2018):
That would mean I loose control over writing a file, I want to be able to Pause the progress, or abort it at least via CancellationToken.... I suggest you to support at least cancellation via your extensions. Feels kinda odd to be not able to abort a large extraction -> usabillity.
EDIT: Same exceptions with the extensions.
@adamhathcock commented on GitHub (Jul 3, 2018):
I understand that. Just trying to make sure there's not an issue with the library.
@naice commented on GitHub (Jul 3, 2018):
That are both archives created with winrar, however the rar_archive is in that zip, file restrictions from github. Passwords are in double braces!
test_archive{{test123456}}.zip
rar_file.zip
@adamhathcock commented on GitHub (Jul 3, 2018):
I'm not going to test it. I was asking you to test extracting with the provided methods to prove it's an issue with the library or just your usage.
@naice commented on GitHub (Jul 3, 2018):
I've already written "Same exceptions with the extensions". Also CompressedBytesRead seems to be never called.
@adamhathcock commented on GitHub (Jul 3, 2018):
You edited that in. You've only provided code try things your way.
You're welcome to open a pull request and add functionality to cancel but I'm not inclined to do it for you.
@naice commented on GitHub (Jul 3, 2018):
It was just a suggestion, maybe i jump in when i got some time left, you know the deal.
is failing and
also. With the exact same exceptions.
@adamhathcock commented on GitHub (Jul 3, 2018):
The zip works for me using the Archive API but not the Reader API. The RAR doesn't work for me in the Reader API and gives me zero byte files in the Archive API
I'm guessing it doesn't like the password for the RAR but I'll look closer. I don't like that the zip works in one case but doesn't in the other. It must be something to do with using the zip dictionary vs not.
@naice commented on GitHub (Jul 3, 2018):
Well true, i have just tested it with the reader API.
@adamhathcock commented on GitHub (Jul 3, 2018):
The zip file is erroring because it's Encrypted and has a Post Data Descriptor header. It's kind of a known issue that is broken. I'm not sure I'm going to fix it anytime soon.
@naice commented on GitHub (Jul 3, 2018):
Ok, i will move on to another solution and discard SharpCompress then, thanks!