M HYPE SPLASH
// general

How can I achieve the maximum zip compression? [closed]

By Emily Wilson

I would like to make a "standard" zip file which contain .jpg images. Which software and switches / options should I use to achieve the maximum compression ratio? I mean maybe I can make a solid archive with some special compression options and high memory usage with 7zip.

4

2 Answers

As jpeg files are already compressed, you could tell zip to just store the files without trying to compress them at all. The switch --compression-method store (or -Z store or -0) will do that. But don't expect to gain anything: usually zip is smart enough to detect that compression won't help.

As ChrisInEdmonton mentioned correctly, JPEG files are highly compressed. Compressing them with another utility will not render any significant size reduction.

However, It is possible to "recompress" JPEG files, because there are better (in terms of size) compression algorithms than the one used in JPEG. According to MaximumCompression, this is done by decoding the image back to the DCT coefficients and recompressing them with a much better algorithm then default Huffman coding (the compression algorithm JPEG uses).

Technicalities aside, the benchmark I mentioned does point out 4 compressors capable of effectively compressing a JPEG file. They are:

  • PAQ8PX with -7
  • STUFFIT 14 with Auto filetype
  • PackJPG 2.5
  • WINZIP 14 with Best Method

As far as I'm aware of, only Winzip provides both a commonly used archive format (.zip) and a decent (considering the compressibility of JPEG files) compression ratio of around 18 %. While PAQ8PX does achieve the top compression ratio (24.37 %), besides not being well known, it will most likely take a significant amount of time to compress the file.