2007-12-08 23:42:33 +01:00
|
|
|
|
2008-12-31 16:41:46 +01:00
|
|
|
XZ Utils
|
2009-01-30 17:50:16 +01:00
|
|
|
========
|
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
0. Overview
|
|
|
|
1. Documentation
|
|
|
|
1.1. Overall documentation
|
2012-03-13 22:04:04 +01:00
|
|
|
1.2. Documentation for command-line tools
|
2009-07-19 12:14:20 +02:00
|
|
|
1.3. Documentation for liblzma
|
|
|
|
2. Version numbering
|
2009-08-27 09:40:25 +02:00
|
|
|
3. Reporting bugs
|
2020-03-16 18:39:45 +01:00
|
|
|
4. Translations
|
2010-09-23 13:03:10 +02:00
|
|
|
5. Other implementations of the .xz format
|
|
|
|
6. Contact information
|
2009-07-19 12:14:20 +02:00
|
|
|
|
2009-01-30 17:50:16 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
0. Overview
|
|
|
|
-----------
|
2009-01-30 17:50:16 +01:00
|
|
|
|
2012-03-13 22:04:04 +01:00
|
|
|
XZ Utils provide a general-purpose data-compression library plus
|
|
|
|
command-line tools. The native file format is the .xz format, but
|
2009-07-19 12:14:20 +02:00
|
|
|
also the legacy .lzma format is supported. The .xz format supports
|
2012-03-13 22:04:04 +01:00
|
|
|
multiple compression algorithms, which are called "filters" in the
|
2009-07-19 12:14:20 +02:00
|
|
|
context of XZ Utils. The primary filter is currently LZMA2. With
|
|
|
|
typical files, XZ Utils create about 30 % smaller files than gzip.
|
2009-01-30 17:50:16 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
To ease adapting support for the .xz format into existing applications
|
|
|
|
and scripts, the API of liblzma is somewhat similar to the API of the
|
2012-03-13 22:04:04 +01:00
|
|
|
popular zlib library. For the same reason, the command-line tool xz
|
|
|
|
has a command-line syntax similar to that of gzip.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2012-03-13 22:04:04 +01:00
|
|
|
When aiming for the highest compression ratio, the LZMA2 encoder uses
|
2009-07-19 12:14:20 +02:00
|
|
|
a lot of CPU time and may use, depending on the settings, even
|
2012-03-13 22:04:04 +01:00
|
|
|
hundreds of megabytes of RAM. However, in fast modes, the LZMA2 encoder
|
2009-07-19 12:14:20 +02:00
|
|
|
competes with bzip2 in compression speed, RAM usage, and compression
|
|
|
|
ratio.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
LZMA2 is reasonably fast to decompress. It is a little slower than
|
|
|
|
gzip, but a lot faster than bzip2. Being fast to decompress means
|
|
|
|
that the .xz format is especially nice when the same file will be
|
|
|
|
decompressed very many times (usually on different computers), which
|
|
|
|
is the case e.g. when distributing software packages. In such
|
|
|
|
situations, it's not too bad if the compression takes some time,
|
|
|
|
since that needs to be done only once to benefit many people.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
With some file types, combining (or "chaining") LZMA2 with an
|
2012-03-13 22:04:04 +01:00
|
|
|
additional filter can improve the compression ratio. A filter chain may
|
|
|
|
contain up to four filters, although usually only one or two are used.
|
2009-07-19 12:14:20 +02:00
|
|
|
For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
|
|
|
|
in the filter chain can improve compression ratio of executable files.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
Since the .xz format allows adding new filter IDs, it is possible that
|
|
|
|
some day there will be a filter that is, for example, much faster to
|
|
|
|
compress than LZMA2 (but probably with worse compression ratio).
|
|
|
|
Similarly, it is possible that some day there is a filter that will
|
|
|
|
compress better than LZMA2.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2020-03-16 19:01:37 +01:00
|
|
|
XZ Utils supports multithreaded compression. XZ Utils doesn't support
|
|
|
|
multithreaded decompression yet. It has been planned though and taken
|
|
|
|
into account when designing the .xz file format. In the future, files
|
|
|
|
that were created in threaded mode can be decompressed in threaded
|
|
|
|
mode too.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
1. Documentation
|
|
|
|
----------------
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
1.1. Overall documentation
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
README This file
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
INSTALL.generic Generic install instructions for those not familiar
|
|
|
|
with packages using GNU Autotools
|
|
|
|
INSTALL Installation instructions specific to XZ Utils
|
|
|
|
PACKAGERS Information to packagers of XZ Utils
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
COPYING XZ Utils copyright and license information
|
|
|
|
COPYING.GPLv2 GNU General Public License version 2
|
|
|
|
COPYING.GPLv3 GNU General Public License version 3
|
|
|
|
COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
AUTHORS The main authors of XZ Utils
|
|
|
|
THANKS Incomplete list of people who have helped making
|
|
|
|
this software
|
|
|
|
NEWS User-visible changes between XZ Utils releases
|
|
|
|
ChangeLog Detailed list of changes (commit log)
|
2010-01-31 22:35:04 +01:00
|
|
|
TODO Known bugs and some sort of to-do list
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
Note that only some of the above files are included in binary
|
|
|
|
packages.
|
2009-03-31 20:52:51 +02:00
|
|
|
|
|
|
|
|
2012-03-13 22:04:04 +01:00
|
|
|
1.2. Documentation for command-line tools
|
2009-03-31 20:52:51 +02:00
|
|
|
|
2012-03-13 22:04:04 +01:00
|
|
|
The command-line tools are documented as man pages. In source code
|
2009-07-19 12:14:20 +02:00
|
|
|
releases (and possibly also in some binary packages), the man pages
|
|
|
|
are also provided in plain text (ASCII only) and PDF formats in the
|
|
|
|
directory "doc/man" to make the man pages more accessible to those
|
|
|
|
whose operating system doesn't provide an easy way to view man pages.
|
2008-04-25 12:32:35 +02:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
|
|
|
|
1.3. Documentation for liblzma
|
|
|
|
|
|
|
|
The liblzma API headers include short docs about each function
|
|
|
|
and data type as Doxygen tags. These docs should be quite OK as
|
|
|
|
a quick reference.
|
|
|
|
|
2020-03-16 19:01:37 +01:00
|
|
|
There are a few example/tutorial programs that should help in
|
|
|
|
getting started with liblzma. In the source package the examples
|
|
|
|
are in "doc/examples" and in binary packages they may be under
|
|
|
|
"examples" in the same directory as this README.
|
2009-07-19 12:14:20 +02:00
|
|
|
|
2020-03-16 19:01:37 +01:00
|
|
|
Since the liblzma API has similarities to the zlib API, some people
|
|
|
|
may find it useful to read the zlib docs and tutorial too:
|
2009-07-19 12:14:20 +02:00
|
|
|
|
2023-03-18 14:51:57 +01:00
|
|
|
https://zlib.net/manual.html
|
|
|
|
https://zlib.net/zlib_how.html
|
2009-07-19 12:14:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
2. Version numbering
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
The version number format of XZ Utils is X.Y.ZS:
|
2008-04-25 12:32:35 +02:00
|
|
|
|
|
|
|
- X is the major version. When this is incremented, the library
|
|
|
|
API and ABI break.
|
|
|
|
|
2012-05-10 20:14:16 +02:00
|
|
|
- Y is the minor version. It is incremented when new features
|
|
|
|
are added without breaking the existing API or ABI. An even Y
|
|
|
|
indicates a stable release and an odd Y indicates unstable
|
|
|
|
(alpha or beta version).
|
2008-04-25 12:32:35 +02:00
|
|
|
|
2012-03-13 22:04:04 +01:00
|
|
|
- Z is the revision. This has a different meaning for stable and
|
2008-04-25 12:32:35 +02:00
|
|
|
unstable releases:
|
2011-12-19 20:21:29 +01:00
|
|
|
|
2008-04-25 12:32:35 +02:00
|
|
|
* Stable: Z is incremented when bugs get fixed without adding
|
2011-12-19 20:21:29 +01:00
|
|
|
any new features. This is intended to be convenient for
|
|
|
|
downstream distributors that want bug fixes but don't want
|
|
|
|
any new features to minimize the risk of introducing new bugs.
|
|
|
|
|
2008-04-25 12:32:35 +02:00
|
|
|
* Unstable: Z is just a counter. API or ABI of features added
|
|
|
|
in earlier unstable releases having the same X.Y may break.
|
|
|
|
|
|
|
|
- S indicates stability of the release. It is missing from the
|
2012-03-13 22:04:04 +01:00
|
|
|
stable releases, where Y is an even number. When Y is odd, S
|
2008-04-25 12:32:35 +02:00
|
|
|
is either "alpha" or "beta" to make it very clear that such
|
|
|
|
versions are not stable releases. The same X.Y.Z combination is
|
2012-03-13 22:04:04 +01:00
|
|
|
not used for more than one stability level, i.e. after X.Y.Zalpha,
|
2008-04-25 12:32:35 +02:00
|
|
|
the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
|
|
|
|
|
|
|
|
|
2009-08-27 09:40:25 +02:00
|
|
|
3. Reporting bugs
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
Naturally it is easiest for me if you already know what causes the
|
|
|
|
unexpected behavior. Even better if you have a patch to propose.
|
|
|
|
However, quite often the reason for unexpected behavior is unknown,
|
|
|
|
so here are a few things to do before sending a bug report:
|
|
|
|
|
2010-01-20 21:02:35 +01:00
|
|
|
1. Try to create a small example how to reproduce the issue.
|
2009-08-27 09:40:25 +02:00
|
|
|
|
|
|
|
2. Compile XZ Utils with debugging code using configure switches
|
|
|
|
--enable-debug and, if possible, --disable-shared. If you are
|
|
|
|
using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting
|
|
|
|
binaries.
|
|
|
|
|
|
|
|
3. Turn on core dumps. The exact command depends on your shell;
|
|
|
|
for example in GNU bash it is done with "ulimit -c unlimited",
|
|
|
|
and in tcsh with "limit coredumpsize unlimited".
|
|
|
|
|
|
|
|
4. Try to reproduce the suspected bug. If you get "assertion failed"
|
|
|
|
message, be sure to include the complete message in your bug
|
|
|
|
report. If the application leaves a coredump, get a backtrace
|
|
|
|
using gdb:
|
|
|
|
$ gdb /path/to/app-binary # Load the app to the debugger.
|
|
|
|
(gdb) core core # Open the coredump.
|
|
|
|
(gdb) bt # Print the backtrace. Copy & paste to bug report.
|
|
|
|
(gdb) quit # Quit gdb.
|
|
|
|
|
|
|
|
Report your bug via email or IRC (see Contact information below).
|
|
|
|
Don't send core dump files or any executables. If you have a small
|
|
|
|
example file(s) (total size less than 256 KiB), please include
|
|
|
|
it/them as an attachment. If you have bigger test files, put them
|
2012-03-13 22:04:04 +01:00
|
|
|
online somewhere and include a URL to the file(s) in the bug report.
|
2009-08-27 09:40:25 +02:00
|
|
|
|
|
|
|
Always include the exact version number of XZ Utils in the bug report.
|
|
|
|
If you are using a snapshot from the git repository, use "git describe"
|
|
|
|
to get the exact snapshot version. If you are using XZ Utils shipped
|
|
|
|
in an operating system distribution, mention the distribution name,
|
|
|
|
distribution version, and exact xz package version; if you cannot
|
|
|
|
repeat the bug with the code compiled from unpatched source code,
|
|
|
|
you probably need to report a bug to your distribution's bug tracking
|
|
|
|
system.
|
|
|
|
|
|
|
|
|
2020-03-16 18:39:45 +01:00
|
|
|
4. Translations
|
|
|
|
---------------
|
2010-09-23 13:03:10 +02:00
|
|
|
|
2020-03-16 18:39:45 +01:00
|
|
|
The xz command line tool and all man pages can be translated.
|
2019-03-04 21:49:04 +01:00
|
|
|
The translations are handled via the Translation Project. If you
|
|
|
|
wish to help translating xz, please join the Translation Project:
|
2010-09-23 13:03:10 +02:00
|
|
|
|
2019-03-04 21:49:04 +01:00
|
|
|
https://translationproject.org/html/translators.html
|
2010-09-23 13:03:10 +02:00
|
|
|
|
2020-03-16 18:46:27 +01:00
|
|
|
Several strings will change in a future version of xz so if you
|
|
|
|
wish to start a new translation, look at the code in the xz git
|
2020-03-23 17:09:40 +01:00
|
|
|
repository instead of a 5.2.x release.
|
2010-09-23 13:03:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
5. Other implementations of the .xz format
|
2009-07-19 12:14:20 +02:00
|
|
|
------------------------------------------
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
7-Zip and the p7zip port of 7-Zip support the .xz format starting
|
|
|
|
from the version 9.00alpha.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2023-03-18 14:51:57 +01:00
|
|
|
https://7-zip.org/
|
|
|
|
https://p7zip.sourceforge.net/
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
XZ Embedded is a limited implementation written for use in the Linux
|
|
|
|
kernel, but it is also suitable for other embedded use.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2017-04-19 21:17:35 +02:00
|
|
|
https://tukaani.org/xz/embedded.html
|
2007-12-08 23:42:33 +01:00
|
|
|
|
|
|
|
|
2010-09-23 13:03:10 +02:00
|
|
|
6. Contact information
|
2009-07-19 12:14:20 +02:00
|
|
|
----------------------
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2009-07-19 12:14:20 +02:00
|
|
|
If you have questions, bug reports, patches etc. related to XZ Utils,
|
2022-11-30 17:08:34 +01:00
|
|
|
the project maintainers Lasse Collin and Jia Tan can be reached via
|
|
|
|
<xz@tukaani.org>.
|
2007-12-08 23:42:33 +01:00
|
|
|
|
2022-11-30 17:08:34 +01:00
|
|
|
You might find Lasse also from #tukaani on Libera Chat (IRC).
|
|
|
|
The nick is Larhzu. The channel tends to be pretty quiet,
|
|
|
|
so just ask your question and someone might wake up.
|
2007-12-08 23:42:33 +01:00
|
|
|
|