File: lzmp.1

package info (click to toggle)
lzma 9.22-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 3,636 kB
  • ctags: 7,947
  • sloc: cpp: 32,791; ansic: 13,738; cs: 3,846; java: 3,077; makefile: 781; asm: 449; sh: 74
file content (187 lines) | stat: -rw-r--r-- 5,496 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
.TH LZMA 1 "23 Dec 2005" "LZMA utils"

.SH NAME
lzma, unlzma, lzcat \- LZMA compression and decompression tool

.SH SYNOPSIS
.B lzma
.RB [ \-123456789cdefhkLqtvV "] [" \-S
.IR suffix "] [" "filenames ..." ]
.br
.B unlzma
.RB [ \-cfhkLqtvV "] [" \-S
.IR suffix "] [" "filenames ..." ]
.br
.B lzcat
.RB [ \-fhLqV ]
.RI [ "filenames ..." ]

.SH DESCRIPTION
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.
.PP
.B lzma
command line tool has a similar interface to
.BR gzip (1)
and
.BR bzip2 (1)
and is intended to make use of LZMA compression easy for the users who
are already familiar with gzip and bzip2.
.PP
In this manual
.B lzma
is compared mostly to bzip2 because that is currently 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 bzip2.
.PP
.B lzma
provides notably better compression ratio than bzip2 especially with
files having other than plain text content. The other advantage of
.B 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.
.PP
When compressing or decompressing with
.BR 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.

.SH 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.
.PP
Both streamed and non-streamed files are compressed identically; the
only differences are found from the beginnings and ends of LZMA
compressed 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.
.PP
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.

.SH OPTIONS
Short options can be grouped like
.BR \-cd.
.TP
.B \-c \-\-stdout \-\-to\-stdout
The output is written to the standard output. The original files are kept
unchanged. When compressing to the standard output there can be only one
input file. This option is implied when input is read from the standard
input or the script is invoked as
.BR lzcat .
.TP
.B \-d \-\-decompress \-\-uncompress
Force decompression regardless of the invocation name. This the default
when called as
.B unlzma
or
.BR lzcat .
.TP
.B \-f \-\-force
Force compression or decompression even if source file is a symlink,
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
.BR cat .
.B lzma
never prompts if target file should be overwritten; existing files are
skipped or, in case of
.BR \-\-force ,
overwritten.
.TP
.B \-h \-\-help
Show a summary of supported options and quit.
.TP
.B \-k \-\-keep
Do not delete the input files after compression or decompression.
.TP
.B \-L \-\-license
Show licensing information of
.BR lzma .
.TP
.B \-q \-\-quiet
Suppress all warnings. You can still check the exit status to detect if
a warning had been shown.
.TP
.BI "\-S \-\-suffix " .suf
Use
.I .suf
instead of the default
.BR .lzma .
A null suffix forces unlzma to decompress all the given files
regardless of the filename suffix.
.TP
.B \-t \-\-test
Check the integrity of the compressed file(s). Without
.B \-\-verbose
no output is produced if no errors are found.
.TP
.B \-v \-\-verbose
Show the filename and percentage reduction of each processes file.
.TP
.B \-V \-\-version
Show the version number of
.BR lzma .
.TP
.B \-z \-\-compress
Force compression regardless of the invocation name.
.TP
.BR \-1 " .. " \-9
Set the compression ratio. These options have no effect when
decompressing.
.TP
.B \-\-fast
Alias to
.BR \-1 .
.TP
.B \-\-best
Alias to
.BR \-9 .

.SH DIAGNOSTICS
Exit status:
.br
.B 0
\- Everything OK.
.br
.B 1
\- An error occurred.
.br
.B 2
\- Something worth a warning happened but no errors.

It can be especially useful with
.BR tar (1)
patched to support LZMA compression.

.SH AUTHORS
The LZMA algorithm and the implementation used in LZMA utils was
developed by Igor Pavlov. The original code is available in LZMA SDK
which can be found from http://7-zip.org/sdk.html .
.PP
.B lzma
command line tool was written by Ville Koskinen.
http://tukaani.org/lzma/
.PP
This manual page is inspired by manual pages of
.B gzip
and
.BR bzip2 .

.SH SEE ALSO
.BR gzip (1),
.BR bzip2 (1)