mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
2672bcc9f8
Previously the default limit was always 40 % of RAM. The new limit is a little bit more complex: - If 40 % of RAM is at least 80 MiB, 40 % of RAM is used as the limit. - If 80 % of RAM is over 80 MiB, 80 MiB is used as the limit. - Otherwise 80 % of RAM is used as the limit. This should make it possible to decompress files created with "xz -9" on more systems. Swapping is generally more expected on systems with less RAM, so higher default limit on them shouldn't cause too bad surprises in terms of heavy swapping. Instead, the higher default limit should reduce the number of bad surprises when it used to prevent decompression of files created with "xz -9". The DoS prevention system shouldn't be a DoS itself. Note that even with the new default limit, a system with 64 MiB RAM cannot decompress files created with "xz -9" without user overriding the limit. This should be OK, because if xz is going to need more memory than the system has RAM, it will run very very slowly and thus it's good that user has to override the limit in that case.
168 lines
3.3 KiB
Groff
168 lines
3.3 KiB
Groff
.\"
|
|
.\" Author: Lasse Collin
|
|
.\"
|
|
.\" This file has been put into the public domain.
|
|
.\" You can do whatever you want with this file.
|
|
.\"
|
|
.TH XZDEC 1 "2010-03-07" "Tukaani" "XZ Utils"
|
|
.SH NAME
|
|
xzdec, lzmadec \- Small .xz and .lzma decompressors
|
|
.SH SYNOPSIS
|
|
.B xzdec
|
|
.RI [ option ]...
|
|
.RI [ file ]...
|
|
.br
|
|
.B lzmadec
|
|
.RI [ option ]...
|
|
.RI [ file ]...
|
|
.SH DESCRIPTION
|
|
.B xzdec
|
|
is a liblzma-based decompression-only tool for
|
|
.B .xz
|
|
(and only
|
|
.BR .xz )
|
|
files.
|
|
.B xzdec
|
|
is intended to work as a drop-in replacement for
|
|
.BR xz (1)
|
|
in the most common situations where a script has been written to use
|
|
.B "xz \-\-decompress \-\-stdout"
|
|
(and possibly a few other commonly used options) to decompress
|
|
.B .xz
|
|
files.
|
|
.B lzmadec
|
|
is identical to
|
|
.B xzdec
|
|
except that
|
|
.B lzmadec
|
|
supports
|
|
.B .lzma
|
|
files instead of
|
|
.B .xz
|
|
files.
|
|
.PP
|
|
To reduce the size of the executable,
|
|
.B xzdec
|
|
doesn't support multithreading or localization, and doesn't read options from
|
|
.B XZ_OPT
|
|
environment variable.
|
|
.B xzdec
|
|
doesn't support displaying intermediate progress information: sending
|
|
.B SIGINFO
|
|
to
|
|
.B xzdec
|
|
does nothing, but sending
|
|
.B SIGUSR1
|
|
terminates the process instead of displaying progress information.
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-d ", " \-\-decompress ", " \-\-uncompress
|
|
Ignored for
|
|
.BR xz (1)
|
|
compatibility.
|
|
.B xzdec
|
|
supports only decompression.
|
|
.TP
|
|
.BR \-k ", " \-\-keep
|
|
Ignored for
|
|
.BR xz (1)
|
|
compatibility.
|
|
.B xzdec
|
|
never creates or removes any files.
|
|
.TP
|
|
.BR \-c ", " \-\-stdout ", " \-\-to-stdout
|
|
Ignored for
|
|
.BR xz (1)
|
|
compatibility.
|
|
.B xzdec
|
|
always writes the decompressed data to standard output.
|
|
.TP
|
|
\fB\-M\fR \fIlimit\fR, \fB\-\-memory=\fIlimit
|
|
Set the memory usage
|
|
.IR limit .
|
|
If this option is specified multiple times, the last one takes effect. The
|
|
.I limit
|
|
can be specified in multiple ways:
|
|
.RS
|
|
.IP \(bu 3
|
|
The
|
|
.I limit
|
|
can be an absolute value in bytes. Using an integer suffix like
|
|
.B MiB
|
|
can be useful. Example:
|
|
.B "\-\-memory=80MiB"
|
|
.IP \(bu 3
|
|
The
|
|
.I limit
|
|
can be specified as a percentage of physical RAM. Example:
|
|
.B "\-\-memory=70%"
|
|
.IP \(bu 3
|
|
The
|
|
.I limit
|
|
can be reset back to its default value by setting it to
|
|
.BR 0 .
|
|
.IP \(bu 3
|
|
The memory usage limiting can be effectively disabled by setting
|
|
.I limit
|
|
to
|
|
.BR max .
|
|
This isn't recommended. It's usually better to use, for example,
|
|
.BR \-\-memory=90% .
|
|
.RE
|
|
.IP
|
|
The current
|
|
.I limit
|
|
can be seen near the bottom of the output of the
|
|
.B \-\-help
|
|
option.
|
|
.TP
|
|
.BR \-q ", " \-\-quiet
|
|
Specifying this once does nothing since
|
|
.B xzdec
|
|
never displays any warnings or notices.
|
|
Specify this twice to suppress errors.
|
|
.TP
|
|
.BR \-Q ", " \-\-no-warn
|
|
Ignored for
|
|
.BR xz (1)
|
|
compatibility.
|
|
.B xzdec
|
|
never uses the exit status
|
|
.BR "2" .
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
Display a help message and exit successfully.
|
|
.TP
|
|
.BR \-V ", " \-\-version
|
|
Display the version number of
|
|
.B xzdec
|
|
and liblzma.
|
|
.SH "EXIT STATUS"
|
|
.TP
|
|
.B 0
|
|
All was good.
|
|
.TP
|
|
.B 1
|
|
An error occurred.
|
|
.PP
|
|
.B xzdec
|
|
doesn't have any warning messages like
|
|
.BR xz (1)
|
|
has, thus the exit status
|
|
.B 2
|
|
is not used by
|
|
.BR xzdec .
|
|
.SH NOTES
|
|
.B xzdec
|
|
and
|
|
.B lzmadec
|
|
are not really that small. The size can be reduced further by dropping
|
|
features from liblzma at compile time, but that shouldn't usually be done
|
|
for executables distributed in typical non-embedded operating system
|
|
distributions. If you need a truly small
|
|
.B .xz
|
|
decompressor, consider using XZ Embedded.
|
|
.SH "SEE ALSO"
|
|
.BR xz (1)
|
|
.PP
|
|
XZ Embedded: <http://tukaani.org/xz/embedded.html>
|