7 1.1. Overall documentation
8 1.2. Documentation for command line tools
9 1.3. Documentation for liblzma
12 4. Other implementations of the .xz format
13 5. Contact information
19 XZ Utils provide a general purporse data compression library and
20 command line tools. The native file format is the .xz format, but
21 also the legacy .lzma format is supported. The .xz format supports
22 multiple compression algorithms, which are called "filters" in
23 context of XZ Utils. The primary filter is currently LZMA2. With
24 typical files, XZ Utils create about 30 % smaller files than gzip.
26 To ease adapting support for the .xz format into existing applications
27 and scripts, the API of liblzma is somewhat similar to the API of the
28 popular zlib library. For the same reason, the command line tool xz
29 has similar command line syntax than that of gzip.
31 When aiming for the highest compression ratio, LZMA2 encoder uses
32 a lot of CPU time and may use, depending on the settings, even
33 hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder
34 competes with bzip2 in compression speed, RAM usage, and compression
37 LZMA2 is reasonably fast to decompress. It is a little slower than
38 gzip, but a lot faster than bzip2. Being fast to decompress means
39 that the .xz format is especially nice when the same file will be
40 decompressed very many times (usually on different computers), which
41 is the case e.g. when distributing software packages. In such
42 situations, it's not too bad if the compression takes some time,
43 since that needs to be done only once to benefit many people.
45 With some file types, combining (or "chaining") LZMA2 with an
46 additional filter can improve compression ratio. A filter chain may
47 contain up to four filters, although usually only one two is used.
48 For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
49 in the filter chain can improve compression ratio of executable files.
51 Since the .xz format allows adding new filter IDs, it is possible that
52 some day there will be a filter that is, for example, much faster to
53 compress than LZMA2 (but probably with worse compression ratio).
54 Similarly, it is possible that some day there is a filter that will
55 compress better than LZMA2.
57 XZ Utils doesn't support multithreaded compression or decompression
58 yet. It has been planned though and taken into account when designing
65 1.1. Overall documentation
69 INSTALL.generic Generic install instructions for those not familiar
70 with packages using GNU Autotools
71 INSTALL Installation instructions specific to XZ Utils
72 PACKAGERS Information to packagers of XZ Utils
74 COPYING XZ Utils copyright and license information
75 COPYING.GPLv2 GNU General Public License version 2
76 COPYING.GPLv3 GNU General Public License version 3
77 COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
79 AUTHORS The main authors of XZ Utils
80 THANKS Incomplete list of people who have helped making
82 NEWS User-visible changes between XZ Utils releases
83 ChangeLog Detailed list of changes (commit log)
85 Note that only some of the above files are included in binary
89 1.2. Documentation for command line tools
91 The command line tools are documented as man pages. In source code
92 releases (and possibly also in some binary packages), the man pages
93 are also provided in plain text (ASCII only) and PDF formats in the
94 directory "doc/man" to make the man pages more accessible to those
95 whose operating system doesn't provide an easy way to view man pages.
98 1.3. Documentation for liblzma
100 The liblzma API headers include short docs about each function
101 and data type as Doxygen tags. These docs should be quite OK as
104 I have planned to write a bunch of very well documented example
105 programs, which (due to comments) should work as a tutorial to
106 various features of liblzma. No such example programs have been
109 For now, if you have never used liblzma, libbzip2, or zlib, I
110 recommend learning *basics* of zlib API. Once you know that, it
111 should be easier to learn liblzma.
113 http://zlib.net/manual.html
114 http://zlib.net/zlib_how.html
120 The version number format of XZ Utils is X.Y.ZS:
122 - X is the major version. When this is incremented, the library
125 - Y is the minor version. It is incremented when new features are
126 added without breaking existing API or ABI. Even Y indicates
127 stable release and odd Y indicates unstable (alpha or beta
130 - Z is the revision. This has different meaning for stable and
132 * Stable: Z is incremented when bugs get fixed without adding
134 * Unstable: Z is just a counter. API or ABI of features added
135 in earlier unstable releases having the same X.Y may break.
137 - S indicates stability of the release. It is missing from the
138 stable releases where Y is an even number. When Y is odd, S
139 is either "alpha" or "beta" to make it very clear that such
140 versions are not stable releases. The same X.Y.Z combination is
141 not used for more than one stability level i.e. after X.Y.Zalpha,
142 the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
148 Naturally it is easiest for me if you already know what causes the
149 unexpected behavior. Even better if you have a patch to propose.
150 However, quite often the reason for unexpected behavior is unknown,
151 so here are a few things to do before sending a bug report:
153 1. Try to create a small example how to reprocude the issue.
155 2. Compile XZ Utils with debugging code using configure switches
156 --enable-debug and, if possible, --disable-shared. If you are
157 using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting
160 3. Turn on core dumps. The exact command depends on your shell;
161 for example in GNU bash it is done with "ulimit -c unlimited",
162 and in tcsh with "limit coredumpsize unlimited".
164 4. Try to reproduce the suspected bug. If you get "assertion failed"
165 message, be sure to include the complete message in your bug
166 report. If the application leaves a coredump, get a backtrace
168 $ gdb /path/to/app-binary # Load the app to the debugger.
169 (gdb) core core # Open the coredump.
170 (gdb) bt # Print the backtrace. Copy & paste to bug report.
171 (gdb) quit # Quit gdb.
173 Report your bug via email or IRC (see Contact information below).
174 Don't send core dump files or any executables. If you have a small
175 example file(s) (total size less than 256 KiB), please include
176 it/them as an attachment. If you have bigger test files, put them
177 online somewhere and include an URL to the file(s) in the bug report.
179 Always include the exact version number of XZ Utils in the bug report.
180 If you are using a snapshot from the git repository, use "git describe"
181 to get the exact snapshot version. If you are using XZ Utils shipped
182 in an operating system distribution, mention the distribution name,
183 distribution version, and exact xz package version; if you cannot
184 repeat the bug with the code compiled from unpatched source code,
185 you probably need to report a bug to your distribution's bug tracking
189 4. Other implementations of the .xz format
190 ------------------------------------------
192 7-Zip and the p7zip port of 7-Zip support the .xz format starting
193 from the version 9.00alpha.
196 http://p7zip.sourceforge.net/
198 XZ Embedded is a limited implementation written for use in the Linux
199 kernel, but it is also suitable for other embedded use.
201 http://tukaani.org/xz/embedded.html
204 5. Contact information
205 ----------------------
207 If you have questions, bug reports, patches etc. related to XZ Utils,
208 contact Lasse Collin <lasse.collin@tukaani.org> (in Finnish or English).
209 tukaani.org uses greylisting to reduce spam, thus when you send your
210 first email, it may get delayed by a few hours. In addition to that,
211 I'm sometimes slow at replying. If you haven't got a reply within two
212 weeks, assume that your email has got lost and resend it or use IRC.
214 You can find me also from #tukaani on Freenode; my nick is Larhzu.
215 The channel tends to be pretty quiet, so just ask your question and