Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
zip64 extension does not respect versionMadeBy/versionNeededToExtract settings at member level #51
The zip64 PR (my own, unfortunately) merged into version 1.66 uses hard-coded values to set attributes versionMadeBy and versionNeededToExtract when writing local and CD headers. It does not use the values available in the Archive::Zip::Member object.
I noticed that when trying to establish round-trip-equality, that is, read some arbitrary zip file with Archive::Zip, write it out again, and compare the result to the original one.
Not sure what an "ideal" solution to this problem would be.
The following logic seems reasonable:
Currently testing that logic ...
Great, send a PR when you're ready.…
On Wed, Sep 18, 2019 at 7:16 AM farblos ***@***.***> wrote: The following logic seems reasonable: - for versionMadeBy, use default value 20 (45 for zip64 EOCD record) or any previously read value. Never change that value when writing. - likewise for versionNeededToExtract, but force a minimum value of 45 when writing headers in zip64 format or the zip64 EOCD record Currently testing that logic ... — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#51?email_source=notifications&email_token=AAAXRZPXG32EWYVNZPDSCQLQKIZ2TA5CNFSM4IXSQDY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7AG4WY#issuecomment-532704859>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAAXRZMJIY22BRQYZ4OEKG3QKIZ2TANCNFSM4IXSQDYQ> .
I checked a zip64 archive created with InfoZip, to see what it does.
First create a zip64 archive (the
Then dump the details (see below). The
Interestingly, if I use InfoZip to create a non-Zip64 archive, it does use
No idea what the rationale is behind that is.
Thanks for the background infomation.
Since I couldn't make anything reasonable of the "2.0" and "3.0" for
But anyway, I very much guess that no code actually cares about these values. My rationale for above logic was: Maintain round-trip equality where possible, but at least enforce the 45 for
I added some short explanation on the logic to the POD as well (in "BUGS AND CAVEATS"), to have it at least documented.