Long Range ZIP (or Lzma RZIP) is a compression program optimised for large files, consisting mainly of a extended rzip step for long-distance redundancy reduction and a normal compressor (LZMA, LZO, gzip, bzip2, or ZPAQ) step. The larger the file and the more memory you have, the better the compression advantage this will provide, especially once the files are larger than 100MB. The advantage can be chosen to be either size (much smaller than bzip2) or speed (much faster than bzip2).
Install lrzip, available in the official repositories.
Compression of directories (recursive) requires lrztar, which first tars the directory, then compresses the single file just like tar does when users compress with gzip or xz (tar zcf ...
and tar Jcz ...
, respectively). Note that the compression algorithms are used after the rzip-like precompressing of the archive, instead of e.g. plain LZMA compression in normal "LZMA compressed archives".
This will produce an LZMA compressed archive foo.tar.lrz
from a directory named foo
:
$ lrztar foo
This will produce an LZMA compressed archive bar.lrz
from a file named bar
:
$ lrzip bar
For extreme compression, add the -z
switch which enables ZPAQ but takes notably longer than LZMA:
$ lrztar -z foo
For extremely fast compression and decompression, use the -l
switch for LZO:
$ lrzip -l bar
To completely extract an archived directory:
$ lrzuntar foo.tar.lrz
To decompress bar.lrz
to bar
:
$ lrunzip bar.lrz
Lrzip uses an extended version of rzip, which does a first pass long distance redundancy reduction. The lrzip modifications make it scale according to memory size. The data is then either:
The major disadvantages are:
The unique feature of lrzip is that it tries to make the most of the available ram in your system at all times for maximum benefit. It does this by default, choosing the largest sized window possible without running out of memory. It also has a unique "sliding mmap" feature which makes it possible to even use a compression window larger than your ramsize, if the file is that large. It does this (with the -U
option) by implementing one large mmap buffer as per normal, and a smaller moving buffer to track which part of the file is currently being examined, emulating a much larger single mmapped buffer. Unfortunately, this mode can be many times slower.
See the README.benchmarks included in the source/docs.
See the README included with the source package.