-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fix zip64 extra field #327
Conversation
Excellent, thank you @Cruaie. Can we create a unit test without including a massive zip file in the repo? Do you have a link to a file this would work on? Can we make a small zip file with the same central directory (no content) to ensure the directory is correctly parsed? |
I see that you can easily create small zip files forcing ZIP64 ( I'll have a look if I find a free available example on the web that showcases the offset length in the extra field. |
Here an example file: https://testfile.org/files-5GB-zip
However I am not sure if there is a feasible way to create a unit test for it. If you have an idea, let me know - I am happy to assist. |
Awesome @Cruaier , I think the best way to do that is to create a dummy file that just has the central directory copied over (binary) but modify the end of central directory to point to position 0 for |
@Cruaier, I tried running your branch against the https://testfile.org/files-5GB-zip file, but the central directory was not parsed correctly. I will look into this, but I wanted to check if you had better luck. |
@ZJONSSON I create 2 new test cases with other possible combinations of ZIP64 extra fields (using the existing zip64.zip as baseline). Please have a look if that's sufficient for you.
It works fine from my side. My code for testing is:
Looking at the existing test cases, I see it won't work with the |
Additionally this PR also solves: #209 |
Thanks @Cruaier awesome work |
Fixes problems with parsing ZIP64 extra fields that contain different content based on the ZIP64 central directory.