17

7-zip gives me 5 options for the compression method to zip files with:

  • Deflate
  • Deflate64
  • LZMA
  • BZip2
  • PPMd

On my Windows 8 machine, the built-in Windows Explorer utility appears to handle LZMA with no problem can list the files in an LZMA-compressed file with no problem...but not actually read them. I know Deflate is the most compatible, but for some files I'm attempting to distribute, the maximum setting results in a file that's 2x larger than the LZMA-compressed file. However, because the people I'm distributing it to have whatever OS, I need a widely-supported format.

What compression methods to the native zip utilities on Windows 7, 8, and Mac OS X support?

Nick T
  • 2,757

4 Answers4

11

If your primary goal is compatibility with all/most OSs and unzipping tools, then Deflate is your best choice.

From Wikipedia's Zip->Compression Methods article:

The most commonly used compression method is DEFLATE, which is described in IETF RFC 1951.

10

Since no one has answered the actual question yet:

What compression methods to the native zip utilities on Windows 7, 8, and Mac OS X support?

  • Windows 7+ supports Deflate and Deflate64.
  • macOS only supports Deflate.
0

Any OS with python 3.3 or above and the zipfile, zlib, bz2 & lzma modules can unpack zip files using Deflate, Deflate64, BZip2 and LZMA compression methods using the zipfile command line interface, e.g.

python3 -m zipfile -e example.zip .

Recent versions of macOS and many (most?) Linux distros fulfil this criteria.

ruario
  • 109
-1

In 2020 it seems that still only zip + Deflate is acceptable for GUIs, but for automated processes and CLI, you've got a few other options:

Native CLI Support: tar

  • Mac ships with BSD tar
  • Linux ships with GNU tar
  • Windows 10 ships with BSD tar.exe

They all support tar.gz.

BSD tar also supports .zip (but not LZMA, unless xz is also installed, which it is not on Windows 10, as of 2020).

zip support is native on MacOS, and pretty easy to get on Linux.

Cross-Platform: arc

If it's reasonable to have someone use a utility that's easy to install and that supports xz (LZMA, same as 7z), arc is lightweight and can be installed without a platform-specific package manager - meaning no brew: bare download or via webinstall.

arc unarchive example.tar.xz

It also supports several other common formats: zip, xz, tar.xz, tar.gz, tar.bz2, etc.

root-aj
  • 981