lzma [-123456789cdefhkLqtvV] [-S suffix] [filenames ...]
unlzma [-cfhkLqtvV] [-S suffix] [filenames ...]
lzcat [-fhLqV] [filenames ...]
LZMA (Lempel-Ziv-Markov chain-Algorithm) is an improved version of
famous LZ77 compression algorithm. It was improved in way of maximum
increasing of compression ratio, keeping high decompression speed and
low memory requirements for decompressing.
lzma command line tool has a similar interface to gzip(1) and bzip2(1)
and is intended to make use of LZMA compression easy for the users who
are already familiar with gzip and bzip2.
In this manual lzma is compared mostly to bzip2 because that is cur-
rently one of the most widely used free software to compress tar files
made for distribution. Comparing lzma to gzip is not practical because
neither lzma nor bzip2 can compete with gzip in compression speed. On
the other hand the compression ratio of gzip is worse than of lzma and
lzma provides notably better compression ratio than bzip2 especially
with files having other than plain text content. The other advantage of
lzma is fast decompression which is many times quicker than bzip2. The
major disadvantage is that achieving the highest compression ratios
requires extensive amount of system resources, both CPU time and RAM.
Also software to handle LZMA compressed files is not installed by
default on most distributions.
When compressing or decompressing with lzma, the new file will have the
same ownership information, permissions and timestamps as the original
file. However the this information is not stored into the compressed
file like gzip does.
STREAMED VS. NON-STREAMED
LZMA files can be either streamed or non-streamed. Non-streamed files
are created only when the size of the file being compressed is known.
In practice this means that the source file must be a regular file. In
other words, if compressing from the standard input or from a named
pipe (fifo) the compressed file will always be streamed.
Both streamed and non-streamed files are compressed identically; the
only differences are found from the beginnings and ends of LZMA com-
pressed files: Non-streamed files contain the uncompressed size of the
file in the LZMA file header; streamed files have uncompressed size
marked as unknown. To know where to stop decoding, streamed files have
a special End Of Stream marker at the end of the LZMA file. The EOS
marker makes streamed files five or six bytes bigger than non-streamed.
So in practice creating non-streamed files has two advantages: 1) the
compressed file is a few bytes smaller and 2) the uncompressed size of
the file can be checked without decompressing the file.
Force compression or decompression even if source file is a sym-
link, target exists, or target is a terminal. In contrast to
gzip and bzip2, if input data is not in LZMA format, --force
does not make lzma behave like cat. lzma never prompts if tar-
get file should be overwritten; existing files are skipped or,
in case of --force, overwritten.
Show a summary of supported options and quit.
Do not delete the input files after compression or decompres-
Show licensing information of lzma.
Suppress all warnings. You can still check the exit status to
detect if a warning had been shown.
-S --suffix .suf
Use .suf instead of the default .lzma. A null suffix forces
unlzma to decompress all the given files regardless of the file-
Check the integrity of the compressed file(s). Without --verbose
no output is produced if no errors are found.
Show the filename and percentage reduction of each processes
Show the version number of lzma.
Force compression regardless of the invocation name.
-1 .. -9
Set the compression ratio. These options have no effect when
--fast Alias to -1.
--best Alias to -9.
0 - Everything OK.
1 - An error occurred.
This manual page is inspired by manual pages of gzip and bzip2.
LZMA utils 23 Dec 2005 LZMA(1)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2019
All Rights Reserved.