14

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?

6
  • 2
    If your primary goal is compatibility with all/most OSs and unzipping tools, then Deflate is your best choice. Mar 27, 2015 at 18:41
  • LZMA is not native to Mac or Win, but 7-zip is available for a large number of platforms. I guess it depends on whether your potential users would already have it, or if the additional download would be less than the difference between LZMA & Deflate
    – Tetsujin
    Mar 27, 2015 at 18:43
  • @Ƭᴇcʜιᴇ007 The posible dupe is a bit platform- & OS-specific. I'd consider this a new question, & your initial comment actually 'the answer' to it.
    – Tetsujin
    Mar 27, 2015 at 18:50
  • 1
    Personally, if the file is big enough to warrant the discussion, I'd hit it with whatever gets the best compression, and provide a link to 7-zip for people who have issues with native tools.
    – Nate
    Mar 27, 2015 at 19:04

4 Answers 4

10

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.

1
7

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.
1

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.

0

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.

3
  • The bit about tar etc. does not appear to clearly address the question. Also there is no standard tar in Windows, so such is less portable without additional tooling. Oct 14, 2021 at 20:41
  • 1
    tar.exe (BSD Tar) has been available as part of the native Windows CLI tooling since the last update of 2017: techcommunity.microsoft.com/t5/containers/…
    – coolaj86
    Oct 15, 2021 at 22:34
  • Generically speaking tar is a form of zip in the same way that 7-zip and WinZip are a form of zip. Tar and WinZip both have a "none" option for compression, and both support other forms of compression too.
    – coolaj86
    Oct 15, 2021 at 22:36

You must log in to answer this question.

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