7-zip cross-platform LZMA file compression

LZIP is better than 7-zip for long-term data archiving

Install 7-zip

7-zip is a popular LZMA cross-platform compression algorithm.

Cygwin

setup-x86_64 -P p7zip

Linux / Windows Subsystem for Linux

apt install p7zip

MacOS

[Keka is a free 7-zip archiver for Mac](http://www.kekaosx.com/)

Windows

[7-zip for Windows](http://www.7-zip.org/download.html)

7-zip examples

Here are some common 7-zip tasks.

Compress 7-zip huge.dat

7z a huge.7z huge.dat

Extract 7-zip file

7z e huge.7z

useful 7-zip options

7-zip by default (GUI and command line) leaves off some the more useful options, such as LZMA2 compression and full CPU multithreading. From the command-line, enable these options with:

-mmt=on -m0=lzma2

Example of optimal 7zip options for large files

7z a -t7z -mx=3 -mmt=on -m0=lzma2  mycomp.7z *.txt

-mx=3 is like “fast” compression. The higher compression settings sometimes don’t add a lot of compression but can take vastly longer.

Tags:

Categories:

Updated:

Leave a Comment