]> icculus.org git repositories - icculus/xz.git/blob - README
Major documentation update.
[icculus/xz.git] / README
1
2 XZ Utils
3 ========
4
5     0. Overview
6     1. Documentation
7        1.1. Overall documentation
8        1.2. Documentation for command line tools
9        1.3. Documentation for liblzma
10     2. Version numbering
11     3. Other implementations of the .xz format
12     4. Contact information
13
14
15 0. Overview
16 -----------
17
18     XZ Utils provide a general purporse data compression library and
19     command line tools. The native file format is the .xz format, but
20     also the legacy .lzma format is supported. The .xz format supports
21     multiple compression algorithms, which are called "filters" in
22     context of XZ Utils. The primary filter is currently LZMA2. With
23     typical files, XZ Utils create about 30 % smaller files than gzip.
24
25     To ease adapting support for the .xz format into existing applications
26     and scripts, the API of liblzma is somewhat similar to the API of the
27     popular zlib library. For the same reason, the command line tool xz
28     has similar command line syntax than that of gzip.
29
30     When aiming for the highest compression ratio, LZMA2 encoder uses
31     a lot of CPU time and may use, depending on the settings, even
32     hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder
33     competes with bzip2 in compression speed, RAM usage, and compression
34     ratio.
35
36     LZMA2 is reasonably fast to decompress. It is a little slower than
37     gzip, but a lot faster than bzip2. Being fast to decompress means
38     that the .xz format is especially nice when the same file will be
39     decompressed very many times (usually on different computers), which
40     is the case e.g. when distributing software packages. In such
41     situations, it's not too bad if the compression takes some time,
42     since that needs to be done only once to benefit many people.
43
44     With some file types, combining (or "chaining") LZMA2 with an
45     additional filter can improve compression ratio. A filter chain may
46     contain up to four filters, although usually only one two is used.
47     For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
48     in the filter chain can improve compression ratio of executable files.
49
50     Since the .xz format allows adding new filter IDs, it is possible that
51     some day there will be a filter that is, for example, much faster to
52     compress than LZMA2 (but probably with worse compression ratio).
53     Similarly, it is possible that some day there is a filter that will
54     compress better than LZMA2.
55
56     XZ Utils doesn't support multithreaded compression or decompression
57     yet. It has been planned though and taken into account when designing
58     the .xz file format.
59
60
61 1. Documentation
62 ----------------
63
64 1.1. Overall documentation
65
66     README              This file
67
68     INSTALL.generic     Generic install instructions for those not familiar
69                         with packages using GNU Autotools
70     INSTALL             Installation instructions specific to XZ Utils
71     PACKAGERS           Information to packagers of XZ Utils
72
73     COPYING             XZ Utils copyright and license information
74     COPYING.GPLv2       GNU General Public License version 2
75     COPYING.GPLv3       GNU General Public License version 3
76     COPYING.LGPLv2.1    GNU Lesser General Public License version 2.1
77
78     AUTHORS             The main authors of XZ Utils
79     THANKS              Incomplete list of people who have helped making
80                         this software
81     NEWS                User-visible changes between XZ Utils releases
82     ChangeLog           Detailed list of changes (commit log)
83
84     Note that only some of the above files are included in binary
85     packages.
86
87
88 1.2. Documentation for command line tools
89
90     The command line tools are documented as man pages. In source code
91     releases (and possibly also in some binary packages), the man pages
92     are also provided in plain text (ASCII only) and PDF formats in the
93     directory "doc/man" to make the man pages more accessible to those
94     whose operating system doesn't provide an easy way to view man pages.
95
96
97 1.3. Documentation for liblzma
98
99     The liblzma API headers include short docs about each function
100     and data type as Doxygen tags. These docs should be quite OK as
101     a quick reference.
102
103     I have planned to write a bunch of very well documented example
104     programs, which (due to comments) should work as a tutorial to
105     various features of liblzma. No such example programs have been
106     written yet.
107
108     For now, if you have never used liblzma, libbzip2, or zlib, I
109     recommend learning *basics* of zlib API. Once you know that, it
110     should be easier to learn liblzma.
111
112         http://zlib.net/manual.html
113         http://zlib.net/zlib_how.html
114
115
116 2. Version numbering
117 --------------------
118
119     The version number format of XZ Utils is X.Y.ZS:
120
121       - X is the major version. When this is incremented, the library
122         API and ABI break.
123
124       - Y is the minor version. It is incremented when new features are
125         added without breaking existing API or ABI. Even Y indicates
126         stable release and odd Y indicates unstable (alpha or beta
127         version).
128
129       - Z is the revision. This has different meaning for stable and
130         unstable releases:
131           * Stable: Z is incremented when bugs get fixed without adding
132             any new features.
133           * Unstable: Z is just a counter. API or ABI of features added
134             in earlier unstable releases having the same X.Y may break.
135
136       - S indicates stability of the release. It is missing from the
137         stable releases where Y is an even number. When Y is odd, S
138         is either "alpha" or "beta" to make it very clear that such
139         versions are not stable releases. The same X.Y.Z combination is
140         not used for more than one stability level i.e. after X.Y.Zalpha,
141         the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
142
143
144 3. Other implementations of the .xz format
145 ------------------------------------------
146
147     7-Zip and the p7zip port of 7-Zip support the .xz format starting
148     from the version 9.00alpha.
149
150         http://7-zip.org/
151         http://p7zip.sourceforge.net/
152
153     XZ Embedded is a limited implementation written for use in the Linux
154     kernel, but it is also suitable for other embedded use.
155
156         http://tukaani.org/xz-embedded/
157
158
159 4. Contact information
160 ----------------------
161
162     If you have questions, bug reports, patches etc. related to XZ Utils,
163     contact Lasse Collin <lasse.collin@tukaani.org>. tukaani.org uses
164     greylisting to reduce spam, thus when you send your first email, it
165     may get delayed by a few hours. In addition to that, I'm sometimes
166     slow at replying. If you haven't got a reply within two weeks, assume
167     that your email has got lost and resend it or use IRC.
168
169     You can find me also from #tukaani on Freenode; my nick is Larhzu.
170     The channel tends to be pretty quiet, so just ask your question and
171     someone may wake up.
172