-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zip64 - 0 Size on Entry > 4GiB #566
Comments
Might need to research the ZIp64 loading of the Extra is correct from APPNOTE.txt
The code does different things based on the length which feels wrong: sharpcompress/src/SharpCompress/Common/Zip/Headers/LocalEntryHeaderExtraFactory.cs Line 83 in faf1a9f
You could be getting the situation were only the uncompressed size is provided but putting it in the wrong field |
Thanks, I was apprehensive I'd made a bad assumption so went for the defensive change. I think you're correct. I don't know which app created the file I'm using so I created another with 7Zip. < 4GiB compressed but > 4GiB decompressed. It has the same behaviour.
Both indicate that length of 8 should be as above. Creating another test zip with a file > 4GiB that compresses to > 4GiB hits |
I think that switch statement shouldn't be there. Looking at the spec, there is a given order of values but it can be variable. So the first 8 bytes, if exists, is always the uncompressed length. |
I think this matches the spec. You beat me to it ha |
I have a zip containing 1 file that's greater than 4GiB.
The Entry returns a Size of 0. I've had a look at the code and the correct size appears to be in the RelativeOffsetOfEntryHeader property of the Zip64ExtendedInformationExtraField class.
I've made a workaround but I don't know how correct it is
There appears to be no other header set
if (RelativeOffsetOfEntryHeader == uint.MaxValue)
is falseAny advice would be appreciated. I'm happy to try and create a PR. I've not done this before.
The text was updated successfully, but these errors were encountered: