I need to distribute a large (6GB+) file cross-platform. For practical reasons, I want to zip it down to 2GB+. I originally used Mac OS 10.11 to create the zip file using the Archive Utility. It extracted fine on my Linux but wouldn't extract on Windows 10 (using the system utility). When compressing the original file on Linux, I can extract it on Windows 10 but it fails to extract on Mac OS X. When I try to extract it using the command line program unzip on Mac OS X, I get the following error:
Archive: UbuntuLTS.vdi.zip
warning [UbuntuLTS.vdi.zip]: 76 extra bytes at beginning or within zipfile (attempting to process anyway)
error [UbuntuLTS.vdi.zip]: reported length of central directory is -76 bytes too long (Atari STZip zipfile? J.H.Holm ZIPSPLIT 1.1 zipfile?). Compensating... skipping: UbuntuLTS.vdi need PK compat. v4.5 (can do v2.1)
note: didn't find end-of-central-dir signature at end of central dir. (please check that you have transferred or created the zipfile in the appropriate BINARY mode and that you have compiled UnZip properly)The Mac is running zip 3.0 (July 5th, 2008) and unzip 5.52 (28 February, 2005). The Linux is running zip 3.0 (July 5th, 2008) and unzip 6.00 (20 April, 2009). No idea what Windows is using. I need the zip to properly extract on Mac OS X, Linux, and Windows (7, 8, 8.1, and 10). I would like to avoid telling people to download a third-party program. I would also like to understand what the heck is going on. I never had trouble with the zip format being incompatible on different platforms.
For any solution you propose, out-of-the-box post-Windows Vista is a must as those will be the biggest target group. I'm aware that asking for it to work on "Linux" is a little ill-defined.
51 Answer
unzip version prior to version 6.0 do not support extracting zip files which are larger than 4 Gb as uncompressed files (or 2 Gb, ). See for example and .
Unfortunately, the standard version of unzip provided by MacOS is not 6.0 but 5.X. Version 6.0 for MacOS can be obtained here: . This article describes how to install version 6:
Additionally, unzip needs to be compiled with the options LARGE_FILE_SUPPORT and ZIP64_SUPPORT in order to be able to process files above 2 Gb / 4 Gb. Commonly, this should be the case. To find out, whether unzip was compiled accordingly, type unzip -version. There should be something like this in the output:
UnZip 6.00 of 20 April 2009 ...
...
UnZip special compilation options:
...
LARGE_FILE_SUPPORT (large files over 2 GiB supported)
ZIP64_SUPPORT (archives using Zip64 for large files supported)
....An alternative to unzip was to use 7zip which is unofficially available for non-Windows operating systems - like MacOS (named 7zX).