lrzip

Langue: en

Version: 147551 (fedora - 04/07/09)

Section: 1 (Commandes utilisateur)

NAME

lrzip - a large-file compression program

SYNOPSIS

lrzip [OPTIONS] <files...>

DESCRIPTION

lrzip is a file compression program designed to do particularly well on very large files containing long distance redundancy.

OPTIONS SUMMARY

Here is a summary of the options to lrzip.

 
 
  -w size       compression window in hundreds of MB
                default chosen by heuristic dependant on ram and chosen compression
  -d            decompress
  -o filename   specify the output file name
  -O directory  specify the output directory when -o is not used
  -S suffix     specify compressed suffix (default '.lrz')
  -f            force overwrite of any existing files
  -D            delete existing files
  -q            don't show compression progress
  -L level      set compression level (1-9, default 7)
  -n            no backend compression - prepare for other compressor
  -l            lzo compression (ultra fast)
  -b            bzip2 compression
  -g            gzip compression using zlib
  -M            Maximum compression - (level 9 and all available ram)
  -T            LZO test compression threshold when LZMA is selected. (1 low -10 high, default 2)
  -N value      Set nice value to value (default 19)
  -v[v]         Increase verbosity
  -V            show version
 
 

OPTIONS

-h
Print an options summary page
-V
Print the lrzip version number
-v[v]
Increases verbosity. -vv will print more messages than -v.
-w n
Set the compression window size to n in hundreds of megabytes. This is the amount of memory lrzip will search during its first stage of pre-compression and is the main thing that will determine how much benefit lrzip will provide over ordinary compression with the 2nd stage algorithm. Because of buffers and compression overheads, the value chosen must be significantly smaller than your available ram or lrzip will induce a massive swap load. If not set (recommended), the value chosen will be determined by internal heuristic in lrzip which uses the most memory that is reasonable.
-L 1..9
Set the compression level from 1 to 9. The default is to use level 7, which is a reasonable compromise between speed and compression. The compression level is also strongly related to how much memory lrzip uses. See the -w option for details.
-M
Maximum compression. If this option is set, then lrzip ignores the heuristic mentioned for the default window and tries to set it to all available ram, and sets the compression level to maximum. This will cause a significant swap load on most machines, and may even fail without enough swap space allocated. Be prepared to walk away if you use this option.
-T 1..10
Sets the LZO compression threshold when testing a data chunk ONLY when LZMA compression is used. The threshold level can be from 1 to 10. This option is used to help prevent LZMA from hanging when the source data is heavily random, made up from other compressed files, and its data is not easily compressed. A threshold level of 2 (default) indicates that the data is barely compressible; >10%. A level of 10 indicates that in order for LZMA compression to occur, the data must be from 90-100% compressed. This option will operate on each chunk discretely, so it's possible to have some blocks compressed, and others not. The default threshold setting, -T 2 seems to work quite well at keeping LZMA from hanging.
-d
Decompress. If this option is not used then lrzip looks at the name used to launch the program. If it contains the string 'lrunzip' then the -d option is automatically set.
-l
LZO Compression. If this option is set then lrzip will use the ultra fast lzo compression algorithm for the 2nd stage. This mode of compression gives bzip2 like compression at the speed it would normally take to simply copy the file, giving excellent compression/time value]&.
-n
No 2nd stage compression. If this option is set then lrzip will only perform the long distance redundancy 1st stage compression. While this does not compress any faster than LZO compression, it produces a smaller file that then responds better to further compression (by eg another application), also reducing the compression time substantially.
-b
Bzip2 compression. Uses bzip2 compression for the 2nd stage, much like the original rzip does.
-g
Gzip compression. Uses gzip compression for the 2nd stage, much like the original rzip does. Uses libz compress and uncompress functions.
-o
Set the output file name. If this option is not set then the output file name is chosen based on the input name and the suffix. The -o option cannot be used if more than one file name is specified on the command line.
-O
Set the output directory for the default filename. This option cannot be combined with -o.
-S
Set the compression suffix. The default is '.lrz'.
-f
If this option is not specified then lrzip will not overwrite any existing files. If you set this option then rzip will silently overwrite any files as needed.
-D
If this option is specified then lrzip will delete the source file after successful compression or decompression. When this option is not specified then the source files are not deleted.
-q
If this option is specified then lrzip will not show the percentage progress while compressing. Note that compression happens in bursts with lzma compression which is the default compression. This means that it will progress very rapidly for short periods and then stop for long periods.
-N value
The default nice value is 19. This option can be used to set the priority scheduling for the lrzip backup or decompression. Valid nice values are from -20 to 19.

INSTALLATION

"make install" or just install lrzip somewhere in your search path.

COMPRESSION ALGORITHM

lrzip operates in two stages. The first stage finds and encodes large chunks of duplicated data over potentially very long distances (limited only by your available ram) in the input file. The second stage is to use a compression algorithm (lzma) to compress the output of the first stage.The compression algorithm can be chosen to be optimised for size (lzma - default), speed (lzo), legacy (bzip2) or can be omitted entirely doing only the first stage. A one stage only compressed file can almost always improve both the compression size and speed done by a subsequent compression program.

The key difference between lrzip and other well known compression algorithms is its ability to take advantage of very long distance redundancy. The well known deflate algorithm used in gzip uses a maximum history buffer of 32k. The block sorting algorithm used in bzip2 is limited to 900k of history. The history buffer in lrzip can be any size long, limited only by available ram. .

It is quite common these days to need to compress files that contain long distance redundancies. For example, when compressing a set of home directories several users might have copies of the same file, or of quite similar files. It is also common to have a single file that contains large duplicated chunks over long distances, such as pdf files containing repeated copies of the same image. Most compression programs won't be able to take advantage of this redundancy, and thus might achieve a much lower compression ratio than lrzip can achieve.

HISTORY - Notes on rzip by Andrew Tridgell

The ideas behind rzip were first implemented in 1998 while I was working on rsync. That version was too slow to be practical, and was replaced by this version in 2003. lrzip was created by the desire to have better compression and/or speed by Con Kolivas on blending the lzma and lzo compression algorithms with the rzip first stage.

BUGS

Rarely lrzip will get stuck compressing one block in lzma mode. The -T option can be used to adjust the compression test threshold.

Unlike most Unix compression programs, lrzip cannot compress or decompress to or from standard input or standard output. This is due to the nature of the algorithm that rzip uses and cannot easily be fixed.

AUTHOR and CREDITS

rzip was written by Andrew Tridgell.

lzma was written by Igor Pavlov.

lzo was written by Markus Oberhumer.

lrzip was bastardised from rzip by Con Kolivas

If you wish to report a problem or make a suggestion then please email Con at kernel@kolivas.org

lrzip is released under the GNU General Public License version 2. Please see the file COPYING for license details.