README revision 207753
1178476Sjb 2178476SjbXZ Utils 3178476Sjb======== 4178476Sjb 5178476Sjb 0. Overview 6178476Sjb 1. Documentation 7178476Sjb 1.1. Overall documentation 8178476Sjb 1.2. Documentation for command line tools 9178476Sjb 1.3. Documentation for liblzma 10178476Sjb 2. Version numbering 11178476Sjb 3. Reporting bugs 12178476Sjb 4. Other implementations of the .xz format 13178476Sjb 5. Contact information 14178476Sjb 15178476Sjb 16178476Sjb0. Overview 17178476Sjb----------- 18178476Sjb 19178476Sjb XZ Utils provide a general-purpose data compression library and 20178476Sjb command line tools. The native file format is the .xz format, but 21178476Sjb also the legacy .lzma format is supported. The .xz format supports 22178476Sjb multiple compression algorithms, which are called "filters" in 23178476Sjb context of XZ Utils. The primary filter is currently LZMA2. With 24178476Sjb typical files, XZ Utils create about 30 % smaller files than gzip. 25178476Sjb 26178476Sjb To ease adapting support for the .xz format into existing applications 27178476Sjb and scripts, the API of liblzma is somewhat similar to the API of the 28178476Sjb popular zlib library. For the same reason, the command line tool xz 29178476Sjb has similar command line syntax than that of gzip. 30178476Sjb 31178476Sjb When aiming for the highest compression ratio, LZMA2 encoder uses 32178476Sjb a lot of CPU time and may use, depending on the settings, even 33178476Sjb hundreds of megabytes of RAM. However, in fast modes, LZMA2 encoder 34178476Sjb competes with bzip2 in compression speed, RAM usage, and compression 35178476Sjb ratio. 36178476Sjb 37178476Sjb LZMA2 is reasonably fast to decompress. It is a little slower than 38178476Sjb gzip, but a lot faster than bzip2. Being fast to decompress means 39178476Sjb that the .xz format is especially nice when the same file will be 40178476Sjb decompressed very many times (usually on different computers), which 41178476Sjb is the case e.g. when distributing software packages. In such 42178476Sjb situations, it's not too bad if the compression takes some time, 43178476Sjb since that needs to be done only once to benefit many people. 44178476Sjb 45178476Sjb With some file types, combining (or "chaining") LZMA2 with an 46178476Sjb additional filter can improve compression ratio. A filter chain may 47178476Sjb contain up to four filters, although usually only one two is used. 48178476Sjb For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2 49178476Sjb in the filter chain can improve compression ratio of executable files. 50178476Sjb 51178476Sjb Since the .xz format allows adding new filter IDs, it is possible that 52178476Sjb some day there will be a filter that is, for example, much faster to 53178476Sjb compress than LZMA2 (but probably with worse compression ratio). 54178476Sjb Similarly, it is possible that some day there is a filter that will 55178476Sjb compress better than LZMA2. 56178476Sjb 57178476Sjb XZ Utils doesn't support multithreaded compression or decompression 58178476Sjb yet. It has been planned though and taken into account when designing 59178476Sjb the .xz file format. 60178476Sjb 61178476Sjb 62178476Sjb1. Documentation 63178476Sjb---------------- 64178476Sjb 65178476Sjb1.1. Overall documentation 66178476Sjb 67178476Sjb README This file 68178476Sjb 69178476Sjb INSTALL.generic Generic install instructions for those not familiar 70178476Sjb with packages using GNU Autotools 71178476Sjb INSTALL Installation instructions specific to XZ Utils 72178476Sjb PACKAGERS Information to packagers of XZ Utils 73178476Sjb 74178476Sjb COPYING XZ Utils copyright and license information 75178476Sjb COPYING.GPLv2 GNU General Public License version 2 76178476Sjb COPYING.GPLv3 GNU General Public License version 3 77178476Sjb COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1 78178476Sjb 79178476Sjb AUTHORS The main authors of XZ Utils 80178476Sjb THANKS Incomplete list of people who have helped making 81178476Sjb this software 82178476Sjb NEWS User-visible changes between XZ Utils releases 83178476Sjb ChangeLog Detailed list of changes (commit log) 84178476Sjb TODO Known bugs and some sort of to-do list 85178476Sjb 86178476Sjb Note that only some of the above files are included in binary 87178476Sjb packages. 88178476Sjb 89178476Sjb 90178476Sjb1.2. Documentation for command line tools 91178476Sjb 92178476Sjb The command line tools are documented as man pages. In source code 93178476Sjb releases (and possibly also in some binary packages), the man pages 94178476Sjb are also provided in plain text (ASCII only) and PDF formats in the 95178476Sjb directory "doc/man" to make the man pages more accessible to those 96178476Sjb whose operating system doesn't provide an easy way to view man pages. 97178476Sjb 98178476Sjb 99178476Sjb1.3. Documentation for liblzma 100178476Sjb 101178476Sjb The liblzma API headers include short docs about each function 102178476Sjb and data type as Doxygen tags. These docs should be quite OK as 103178476Sjb a quick reference. 104178476Sjb 105178476Sjb I have planned to write a bunch of very well documented example 106178476Sjb programs, which (due to comments) should work as a tutorial to 107178476Sjb various features of liblzma. No such example programs have been 108178476Sjb written yet. 109178476Sjb 110178476Sjb For now, if you have never used liblzma, libbzip2, or zlib, I 111178476Sjb recommend learning *basics* of zlib API. Once you know that, it 112178476Sjb should be easier to learn liblzma. 113178476Sjb 114178476Sjb http://zlib.net/manual.html 115178476Sjb http://zlib.net/zlib_how.html 116178476Sjb 117178476Sjb 118178476Sjb2. Version numbering 119178476Sjb-------------------- 120178476Sjb 121178476Sjb The version number format of XZ Utils is X.Y.ZS: 122178476Sjb 123178476Sjb - X is the major version. When this is incremented, the library 124178476Sjb API and ABI break. 125178476Sjb 126178476Sjb - Y is the minor version. It is incremented when new features are 127178476Sjb added without breaking existing API or ABI. Even Y indicates 128178476Sjb stable release and odd Y indicates unstable (alpha or beta 129178476Sjb version). 130178476Sjb 131178476Sjb - Z is the revision. This has different meaning for stable and 132178476Sjb unstable releases: 133178476Sjb * Stable: Z is incremented when bugs get fixed without adding 134178476Sjb any new features. 135178476Sjb * Unstable: Z is just a counter. API or ABI of features added 136178476Sjb in earlier unstable releases having the same X.Y may break. 137178476Sjb 138178476Sjb - S indicates stability of the release. It is missing from the 139178476Sjb stable releases where Y is an even number. When Y is odd, S 140178476Sjb is either "alpha" or "beta" to make it very clear that such 141178476Sjb versions are not stable releases. The same X.Y.Z combination is 142178476Sjb not used for more than one stability level i.e. after X.Y.Zalpha, 143178476Sjb the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta. 144178476Sjb 145178476Sjb 146178476Sjb3. Reporting bugs 147178476Sjb----------------- 148178476Sjb 149178476Sjb Naturally it is easiest for me if you already know what causes the 150178476Sjb unexpected behavior. Even better if you have a patch to propose. 151178476Sjb However, quite often the reason for unexpected behavior is unknown, 152178476Sjb so here are a few things to do before sending a bug report: 153178476Sjb 154178476Sjb 1. Try to create a small example how to reproduce the issue. 155178476Sjb 156178476Sjb 2. Compile XZ Utils with debugging code using configure switches 157178476Sjb --enable-debug and, if possible, --disable-shared. If you are 158178476Sjb using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting 159178476Sjb binaries. 160178476Sjb 161178476Sjb 3. Turn on core dumps. The exact command depends on your shell; 162178476Sjb for example in GNU bash it is done with "ulimit -c unlimited", 163178476Sjb and in tcsh with "limit coredumpsize unlimited". 164178476Sjb 165178476Sjb 4. Try to reproduce the suspected bug. If you get "assertion failed" 166178476Sjb message, be sure to include the complete message in your bug 167178476Sjb report. If the application leaves a coredump, get a backtrace 168178476Sjb using gdb: 169178476Sjb $ gdb /path/to/app-binary # Load the app to the debugger. 170178476Sjb (gdb) core core # Open the coredump. 171178476Sjb (gdb) bt # Print the backtrace. Copy & paste to bug report. 172178476Sjb (gdb) quit # Quit gdb. 173178476Sjb 174178476Sjb Report your bug via email or IRC (see Contact information below). 175178476Sjb Don't send core dump files or any executables. If you have a small 176178476Sjb example file(s) (total size less than 256 KiB), please include 177178476Sjb it/them as an attachment. If you have bigger test files, put them 178178476Sjb online somewhere and include an URL to the file(s) in the bug report. 179178476Sjb 180178476Sjb Always include the exact version number of XZ Utils in the bug report. 181178476Sjb If you are using a snapshot from the git repository, use "git describe" 182178476Sjb to get the exact snapshot version. If you are using XZ Utils shipped 183178476Sjb in an operating system distribution, mention the distribution name, 184178476Sjb distribution version, and exact xz package version; if you cannot 185178476Sjb repeat the bug with the code compiled from unpatched source code, 186178476Sjb you probably need to report a bug to your distribution's bug tracking 187178476Sjb system. 188178476Sjb 189178476Sjb 190178476Sjb4. Other implementations of the .xz format 191178476Sjb------------------------------------------ 192178476Sjb 193178476Sjb 7-Zip and the p7zip port of 7-Zip support the .xz format starting 194178476Sjb from the version 9.00alpha. 195178476Sjb 196178476Sjb http://7-zip.org/ 197178476Sjb http://p7zip.sourceforge.net/ 198178476Sjb 199178476Sjb XZ Embedded is a limited implementation written for use in the Linux 200178476Sjb kernel, but it is also suitable for other embedded use. 201178476Sjb 202178476Sjb http://tukaani.org/xz/embedded.html 203178476Sjb 204178476Sjb 205178476Sjb5. Contact information 206178476Sjb---------------------- 207178476Sjb 208178476Sjb If you have questions, bug reports, patches etc. related to XZ Utils, 209178476Sjb contact Lasse Collin <lasse.collin@tukaani.org> (in Finnish or English). 210178476Sjb tukaani.org uses greylisting to reduce spam, thus when you send your 211178476Sjb first email, it may get delayed by a few hours. In addition to that, 212178476Sjb I'm sometimes slow at replying. If you haven't got a reply within two 213178476Sjb weeks, assume that your email has got lost and resend it or use IRC. 214178476Sjb 215178476Sjb You can find me also from #tukaani on Freenode; my nick is Larhzu. 216178476Sjb The channel tends to be pretty quiet, so just ask your question and 217178476Sjb someone may wake up. 218178476Sjb 219178476Sjb