]> icculus.org git repositories - icculus/xz.git/blob - src/xzdec/xzdec.1
Add lzma_physmem().
[icculus/xz.git] / src / xzdec / xzdec.1
1 .\"
2 .\" Author: Lasse Collin
3 .\"
4 .\" This file has been put into the public domain.
5 .\" You can do whatever you want with this file.
6 .\"
7 .TH XZDEC 1 "2009-06-04" "Tukaani" "XZ Utils"
8 .SH NAME
9 xzdec, lzmadec \- Small .xz and .lzma decompressors
10 .SH SYNOPSIS
11 .B xzdec
12 .RI [ option ]...
13 .RI [ file ]...
14 .br
15 .B lzmadec
16 .RI [ option ]...
17 .RI [ file ]...
18 .SH DESCRIPTION
19 .B xzdec
20 is a liblzma-based decompression-only tool for
21 .B .xz
22 (and only
23 .BR .xz )
24 files.
25 .B xzdec
26 is intended to work as a drop-in replacement for
27 .BR xz (1)
28 in the most common situations where a script has been written to use
29 .B "xz \-\-decompress \-\-stdout"
30 (and possibly a few other commonly used options) to decompress
31 .B .xz
32 files.
33 .B lzmadec
34 is identical to
35 .B xzdec
36 except that
37 .B lzmadec
38 supports
39 .B .lzma
40 files instead of
41 .B .xz
42 files.
43 .PP
44 To reduce the size of the executable,
45 .B xzdec
46 doesn't support multithreading or localization, and doesn't read options from
47 .B XZ_OPT
48 environment variable.
49 .B xzdec
50 doesn't support displaying intermediate progress information: sending
51 .B SIGINFO
52 to
53 .B xzdec
54 does nothing, but sending
55 .B SIGUSR1
56 terminates the process instead of displaying progress information.
57 .SH OPTIONS
58 .TP
59 .BR \-d ", " \-\-decompress ", " \-\-uncompress
60 Ignored for
61 .BR xz (1)
62 compatibility.
63 .B xzdec
64 supports only decompression.
65 .TP
66 .BR \-k ", " \-\-keep
67 Ignored for
68 .BR xz (1)
69 compatibility.
70 .B xzdec
71 never creates or removes any files.
72 .TP
73 .BR \-c ", " \-\-stdout ", " \-\-to-stdout
74 Ignored for
75 .BR xz (1)
76 compatibility.
77 .B xzdec
78 always writes the decompressed data to standard output.
79 .TP
80 \fB\-M\fR \fIlimit\fR, \fB\-\-memory=\fIlimit
81 Set the memory usage
82 .IR limit .
83 If this option is specified multiple times, the last one takes effect. The
84 .I limit
85 can be specified in multiple ways:
86 .RS
87 .IP \(bu 3
88 The
89 .I limit
90 can be an absolute value in bytes. Using an integer suffix like
91 .B MiB
92 can be useful. Example:
93 .B "\-\-memory=80MiB"
94 .IP \(bu 3
95 The
96 .I limit
97 can be specified as a percentage of physical RAM. Example:
98 .B "\-\-memory=70%"
99 .IP \(bu 3
100 The
101 .I limit
102 can be reset back to its default value (currently 40 % of physical RAM)
103 by setting it to
104 .BR 0 .
105 .IP \(bu 3
106 The memory usage limiting can be effectively disabled by setting
107 .I limit
108 to
109 .BR max .
110 This isn't recommended. It's usually better to use, for example,
111 .BR \-\-memory=90% .
112 .RE
113 .IP
114 The current
115 .I limit
116 can be seen near the bottom of the output of the
117 .B \-\-help
118 option.
119 .TP
120 .BR \-q ", " \-\-quiet
121 Specifying this once does nothing since
122 .B xzdec
123 never displays any warnings or notices.
124 Specify this twice to suppress errors.
125 .TP
126 .BR \-Q ", " \-\-no-warn
127 Ignored for
128 .BR xz (1)
129 compatibility.
130 .B xzdec
131 never uses the exit status
132 .BR "2" .
133 .TP
134 .BR \-h ", " \-\-help
135 Display a help message and exit successfully.
136 .TP
137 .BR \-V ", " \-\-version
138 Display the version number of
139 .B xzdec
140 and liblzma.
141 .SH "EXIT STATUS"
142 .TP
143 .B 0
144 All was good.
145 .TP
146 .B 1
147 An error occurred.
148 .PP
149 .B xzdec
150 doesn't have any warning messages like
151 .BR xz (1)
152 has, thus the exit status
153 .B 2
154 is not used by
155 .BR xzdec .
156 .SH NOTES
157 .B xzdec
158 and
159 .B lzmadec
160 are not really that small. The size can be reduced further by dropping
161 features from liblzma at compile time, but that shouldn't usually be done
162 for executables distributed in typical non-embedded operating system
163 distributions. If you need a truly small
164 .B .xz
165 decompressor, consider using XZ Embedded.
166 .\" TODO: Provide URL to XZ Embedded.
167 .SH "SEE ALSO"
168 .BR xz (1)