I recently found out that Unzip is unable to extract large ZIP files that originate from Microsoft's OneDrive web client. Using Unzip 6.0, unzipping results in the following error:
Archive: kb-4d8a2f9a-5e0b-11ea-9376-40b0341fbf5f.zip warning [kb-4d8a2f9a-5e0b-11ea-9376-40b0341fbf5f.zip]: 1859568605 extra bytes at beginning or within zipfile (attempting to process anyway) error [kb-4d8a2f9a-5e0b-11ea-9376-40b0341fbf5f.zip]: start of central directory not found; zipfile corrupt. (please check that you have transferred or created the zipfile in the appropriate BINARY mode and that you have compiled UnZip properly)
After some investigating, it turns out that the problem is caused by the “total number of disks” field in the “zip64 end of central dir locator” of these files. The OneDrive web client sets this value to 0 (zero), whereas Unzip expects a value of 1. After changing the offending values with a Hex editor, affected files extract normally in Unzip.
This also affects the Zip tool, if it is used with the -T ("test zipfile integrity") switch.
I've posted a detailed report on the problem here:
Would it be possible to change the current behavior of Unzip (and also the Zip integrity check) in order to allow such files to be extracted? If needed I can provide a sample file that demonstrates the problem.
Oops, didn't realise I was posting this under Patches instead of Issues. Also, going through the open issues list, this looks like a duplicate of this old issue (although it's not entirely clear to me what its status is). Meanwhile please feel free to delete this ticket!
Last edit: Johan van der Knijff 2020-03-17