0

How can I make a v1.0 zip archive, so that when ran against file returns

Zip archive data, at least v1.0 to extract

When I create a zip file with the zip command line utility or Xarchiver, file returns

Zip archive data, at least v2.0 to extract

2 Answers 2

5

You can create version 1 ZIP archives using Info-Zip’s zip 1.1, which is still available (download zip11.zip). You’ll need to build it from source (make sysv on a Linux system); then you’ll be able to use the newly-built zip to create old-format archives:

$ ./zip -9 test.zip zip.c
adding zip.c (imploded 70%)
$ file test.zip
test.zip: Zip archive data, at least v1.0 to extract
$ unzip -v test.zip
Archive:  test.zip
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
   25825  Implode    7749  70% 10-21-1991 13:33 e1f47bfc  zip.c
--------          -------  ---                            -------
   25825             7749  70%                            1 file

This uses the “implode” or “shrink” algorithms for compression (it uses whichever is better with any given file), rather than the “deflate” algorithm used in version 2 of the format.

0

It seems that the v2.0 zip utility was the first to support compression. Zip archives that require 'at least v1.0 to extract' can be created by passing -0 (no compression) to the zip utility.

1
  • Version 1 did support compression. Version 2 introduced the “deflate” algorithm, and that’s what results in archives which can’t be extracted with version 1. Info-Zip’s zip only supports deflation in version 2, none of the other ZIP compression algorithms, so your solution is indeed the only way to produce v1-compatible archives using that tool, but the explanation is incorrect. Aug 24, 2019 at 7:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .