How to achieve the best, standard ZIP compression

compressionzip

I don't care how long it takes to compress, all I want to achieve is two things:

  • The absolute best possible compression ratio
  • Compatibility with standard readers, such as Windows and WinZip

So suggestions such as 7-zip won't be of much use, unless 7-zip is also slightly better at the standard ZIP compression (as opposed to using it's very good .7z format).

Ideally I'm looking for:

  • A recommendation of a piece of software
  • The particular settings for that software that enable the absolute best compression
  • Something that's free

Remember, how long it takes to compress is not an issue!

One last thing – some files might be better compressed with different settings, like the "Word size" or "Dictionary size" – is there a tool that can analyse the files and choose the most appropriate compression ratio, or does WinZip, 7-zip etc. already do that?

Best Answer

If you want compatibility with the Zip Folders capability built into Windows XP, you're stuck with Deflate compression. I don't think you can even use Deflate64, much less the advanced compression methods (like LZMA, PPMD, WavPack, Bzip2, etc.) available in recent versions of winZip and PowerArchiver. PowerArchiver at least defaults to using the .zipx extension for those files -- I don't think WinZip is doing that yet.

The smallest possible zip file that 7-Zip can create can be done with the following command line:

7za a -mm=Deflate -mfb=258 -mpass=15 -r C:\Path\To\Archive.zip C:\Path\To\Files\*

Of particular note: 7-Zip's wildcard parser is not the same as most others on the system. *.* means all files that have extensions. * means all files.

Creating .zip files this way (and, presumably, using other tools that attempt to make smaller "standard" .zip files) is really, really slow. You would most likely save considerable time and space by using 7-Zip or WinRar to create self extracting archives.

Related Question