Even if it's true that the ZIP compression format doesn't support creation of solid archives, the same effect can be obtained by a little two-step trick.

  1. First of all create a ZIP archive with the files you want to compress without actually compressing them, i.e. taking care of setting the compression level to "none" (a.k.a. the STORE compression method).
  2. Now compress the ZIP archive created in the previous step, this time using a high compression level.

This trick allows the venerable ZIP compression format to perform way better when data is repeated/similar in different files. In my testing I found that reductions of up to 25% in compressed size can be expected when compared to the vanilla ZIP compression.

If possible, when creating the first uncompressed archive, try to put together similar files so that the second step can better exploit the redundancy. An easy way to do this is supplying the list of files to be compressed ordered by file type.

Please note that this method is nothing new: on UNIX when you see .tar.gz or .tar.bz2 archives they are using the very same trick: first create a unique uncompressed file (using tar) and then run it through the actual compressor (gzip, bzip2, etc.)

1985-2014 CAFxX