Home | History | Annotate | Line # | Download | only in dist
      1      1.1     joerg 
      2      1.1     joerg XZ Utils
      3      1.1     joerg ========
      4      1.1     joerg 
      5      1.1     joerg     0. Overview
      6      1.1     joerg     1. Documentation
      7      1.1     joerg        1.1. Overall documentation
      8  1.1.1.2  christos        1.2. Documentation for command-line tools
      9      1.1     joerg        1.3. Documentation for liblzma
     10      1.1     joerg     2. Version numbering
     11      1.1     joerg     3. Reporting bugs
     12  1.1.1.4  christos     4. Translations
     13  1.1.1.4  christos        4.1. Testing translations
     14      1.1     joerg     5. Other implementations of the .xz format
     15      1.1     joerg     6. Contact information
     16      1.1     joerg 
     17      1.1     joerg 
     18      1.1     joerg 0. Overview
     19      1.1     joerg -----------
     20      1.1     joerg 
     21  1.1.1.2  christos     XZ Utils provide a general-purpose data-compression library plus
     22  1.1.1.2  christos     command-line tools. The native file format is the .xz format, but
     23      1.1     joerg     also the legacy .lzma format is supported. The .xz format supports
     24  1.1.1.2  christos     multiple compression algorithms, which are called "filters" in the
     25      1.1     joerg     context of XZ Utils. The primary filter is currently LZMA2. With
     26      1.1     joerg     typical files, XZ Utils create about 30 % smaller files than gzip.
     27      1.1     joerg 
     28      1.1     joerg     To ease adapting support for the .xz format into existing applications
     29      1.1     joerg     and scripts, the API of liblzma is somewhat similar to the API of the
     30  1.1.1.2  christos     popular zlib library. For the same reason, the command-line tool xz
     31  1.1.1.2  christos     has a command-line syntax similar to that of gzip.
     32      1.1     joerg 
     33  1.1.1.2  christos     When aiming for the highest compression ratio, the LZMA2 encoder uses
     34      1.1     joerg     a lot of CPU time and may use, depending on the settings, even
     35  1.1.1.2  christos     hundreds of megabytes of RAM. However, in fast modes, the LZMA2 encoder
     36      1.1     joerg     competes with bzip2 in compression speed, RAM usage, and compression
     37      1.1     joerg     ratio.
     38      1.1     joerg 
     39      1.1     joerg     LZMA2 is reasonably fast to decompress. It is a little slower than
     40      1.1     joerg     gzip, but a lot faster than bzip2. Being fast to decompress means
     41      1.1     joerg     that the .xz format is especially nice when the same file will be
     42      1.1     joerg     decompressed very many times (usually on different computers), which
     43      1.1     joerg     is the case e.g. when distributing software packages. In such
     44      1.1     joerg     situations, it's not too bad if the compression takes some time,
     45      1.1     joerg     since that needs to be done only once to benefit many people.
     46      1.1     joerg 
     47      1.1     joerg     With some file types, combining (or "chaining") LZMA2 with an
     48  1.1.1.2  christos     additional filter can improve the compression ratio. A filter chain may
     49  1.1.1.2  christos     contain up to four filters, although usually only one or two are used.
     50      1.1     joerg     For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
     51      1.1     joerg     in the filter chain can improve compression ratio of executable files.
     52      1.1     joerg 
     53      1.1     joerg     Since the .xz format allows adding new filter IDs, it is possible that
     54      1.1     joerg     some day there will be a filter that is, for example, much faster to
     55      1.1     joerg     compress than LZMA2 (but probably with worse compression ratio).
     56      1.1     joerg     Similarly, it is possible that some day there is a filter that will
     57      1.1     joerg     compress better than LZMA2.
     58      1.1     joerg 
     59  1.1.1.4  christos     XZ Utils supports multithreaded compression. XZ Utils doesn't support
     60  1.1.1.4  christos     multithreaded decompression yet. It has been planned though and taken
     61  1.1.1.4  christos     into account when designing the .xz file format. In the future, files
     62  1.1.1.4  christos     that were created in threaded mode can be decompressed in threaded
     63  1.1.1.4  christos     mode too.
     64      1.1     joerg 
     65      1.1     joerg 
     66      1.1     joerg 1. Documentation
     67      1.1     joerg ----------------
     68      1.1     joerg 
     69      1.1     joerg 1.1. Overall documentation
     70      1.1     joerg 
     71  1.1.1.4  christos     README                This file
     72      1.1     joerg 
     73  1.1.1.4  christos     INSTALL.generic       Generic install instructions for those not
     74  1.1.1.4  christos                           familiar with packages using GNU Autotools
     75  1.1.1.4  christos     INSTALL               Installation instructions specific to XZ Utils
     76  1.1.1.4  christos     PACKAGERS             Information to packagers of XZ Utils
     77  1.1.1.4  christos 
     78  1.1.1.4  christos     COPYING               XZ Utils copyright and license information
     79  1.1.1.4  christos     COPYING.0BSD          BSD Zero Clause License
     80  1.1.1.4  christos     COPYING.GPLv2         GNU General Public License version 2
     81  1.1.1.4  christos     COPYING.GPLv3         GNU General Public License version 3
     82  1.1.1.4  christos     COPYING.LGPLv2.1      GNU Lesser General Public License version 2.1
     83  1.1.1.4  christos 
     84  1.1.1.4  christos     AUTHORS               The main authors of XZ Utils
     85  1.1.1.4  christos     THANKS                Incomplete list of people who have helped making
     86  1.1.1.4  christos                           this software
     87  1.1.1.4  christos     NEWS                  User-visible changes between XZ Utils releases
     88  1.1.1.4  christos     ChangeLog             Detailed list of changes (commit log)
     89  1.1.1.4  christos     TODO                  Known bugs and some sort of to-do list
     90      1.1     joerg 
     91      1.1     joerg     Note that only some of the above files are included in binary
     92      1.1     joerg     packages.
     93      1.1     joerg 
     94      1.1     joerg 
     95  1.1.1.2  christos 1.2. Documentation for command-line tools
     96      1.1     joerg 
     97  1.1.1.2  christos     The command-line tools are documented as man pages. In source code
     98      1.1     joerg     releases (and possibly also in some binary packages), the man pages
     99  1.1.1.4  christos     are also provided in plain text (ASCII only) format in the directory
    100  1.1.1.4  christos     "doc/man" to make the man pages more accessible to those whose
    101  1.1.1.4  christos     operating system doesn't provide an easy way to view man pages.
    102      1.1     joerg 
    103      1.1     joerg 
    104      1.1     joerg 1.3. Documentation for liblzma
    105      1.1     joerg 
    106      1.1     joerg     The liblzma API headers include short docs about each function
    107      1.1     joerg     and data type as Doxygen tags. These docs should be quite OK as
    108      1.1     joerg     a quick reference.
    109      1.1     joerg 
    110  1.1.1.4  christos     There are a few example/tutorial programs that should help in
    111  1.1.1.4  christos     getting started with liblzma. In the source package the examples
    112  1.1.1.4  christos     are in "doc/examples" and in binary packages they may be under
    113  1.1.1.4  christos     "examples" in the same directory as this README.
    114      1.1     joerg 
    115  1.1.1.4  christos     Since the liblzma API has similarities to the zlib API, some people
    116  1.1.1.4  christos     may find it useful to read the zlib docs and tutorial too:
    117  1.1.1.4  christos 
    118  1.1.1.4  christos         https://zlib.net/manual.html
    119  1.1.1.4  christos         https://zlib.net/zlib_how.html
    120      1.1     joerg 
    121      1.1     joerg 
    122      1.1     joerg 2. Version numbering
    123      1.1     joerg --------------------
    124      1.1     joerg 
    125      1.1     joerg     The version number format of XZ Utils is X.Y.ZS:
    126      1.1     joerg 
    127      1.1     joerg       - X is the major version. When this is incremented, the library
    128      1.1     joerg         API and ABI break.
    129      1.1     joerg 
    130  1.1.1.2  christos       - Y is the minor version. It is incremented when new features
    131  1.1.1.2  christos         are added without breaking the existing API or ABI. An even Y
    132  1.1.1.2  christos         indicates a stable release and an odd Y indicates unstable
    133  1.1.1.2  christos         (alpha or beta version).
    134      1.1     joerg 
    135  1.1.1.2  christos       - Z is the revision. This has a different meaning for stable and
    136      1.1     joerg         unstable releases:
    137  1.1.1.2  christos 
    138      1.1     joerg           * Stable: Z is incremented when bugs get fixed without adding
    139  1.1.1.2  christos             any new features. This is intended to be convenient for
    140  1.1.1.2  christos             downstream distributors that want bug fixes but don't want
    141  1.1.1.2  christos             any new features to minimize the risk of introducing new bugs.
    142  1.1.1.2  christos 
    143      1.1     joerg           * Unstable: Z is just a counter. API or ABI of features added
    144      1.1     joerg             in earlier unstable releases having the same X.Y may break.
    145      1.1     joerg 
    146      1.1     joerg       - S indicates stability of the release. It is missing from the
    147  1.1.1.2  christos         stable releases, where Y is an even number. When Y is odd, S
    148      1.1     joerg         is either "alpha" or "beta" to make it very clear that such
    149      1.1     joerg         versions are not stable releases. The same X.Y.Z combination is
    150  1.1.1.2  christos         not used for more than one stability level, i.e. after X.Y.Zalpha,
    151      1.1     joerg         the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
    152      1.1     joerg 
    153      1.1     joerg 
    154      1.1     joerg 3. Reporting bugs
    155      1.1     joerg -----------------
    156      1.1     joerg 
    157      1.1     joerg     Naturally it is easiest for me if you already know what causes the
    158      1.1     joerg     unexpected behavior. Even better if you have a patch to propose.
    159      1.1     joerg     However, quite often the reason for unexpected behavior is unknown,
    160      1.1     joerg     so here are a few things to do before sending a bug report:
    161      1.1     joerg 
    162      1.1     joerg       1. Try to create a small example how to reproduce the issue.
    163      1.1     joerg 
    164      1.1     joerg       2. Compile XZ Utils with debugging code using configure switches
    165      1.1     joerg          --enable-debug and, if possible, --disable-shared. If you are
    166      1.1     joerg          using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting
    167      1.1     joerg          binaries.
    168      1.1     joerg 
    169      1.1     joerg       3. Turn on core dumps. The exact command depends on your shell;
    170      1.1     joerg          for example in GNU bash it is done with "ulimit -c unlimited",
    171      1.1     joerg          and in tcsh with "limit coredumpsize unlimited".
    172      1.1     joerg 
    173      1.1     joerg       4. Try to reproduce the suspected bug. If you get "assertion failed"
    174      1.1     joerg          message, be sure to include the complete message in your bug
    175      1.1     joerg          report. If the application leaves a coredump, get a backtrace
    176      1.1     joerg          using gdb:
    177      1.1     joerg            $ gdb /path/to/app-binary   # Load the app to the debugger.
    178      1.1     joerg            (gdb) core core   # Open the coredump.
    179      1.1     joerg            (gdb) bt   # Print the backtrace. Copy & paste to bug report.
    180      1.1     joerg            (gdb) quit   # Quit gdb.
    181      1.1     joerg 
    182      1.1     joerg     Report your bug via email or IRC (see Contact information below).
    183      1.1     joerg     Don't send core dump files or any executables. If you have a small
    184      1.1     joerg     example file(s) (total size less than 256 KiB), please include
    185      1.1     joerg     it/them as an attachment. If you have bigger test files, put them
    186  1.1.1.2  christos     online somewhere and include a URL to the file(s) in the bug report.
    187      1.1     joerg 
    188      1.1     joerg     Always include the exact version number of XZ Utils in the bug report.
    189      1.1     joerg     If you are using a snapshot from the git repository, use "git describe"
    190      1.1     joerg     to get the exact snapshot version. If you are using XZ Utils shipped
    191      1.1     joerg     in an operating system distribution, mention the distribution name,
    192      1.1     joerg     distribution version, and exact xz package version; if you cannot
    193      1.1     joerg     repeat the bug with the code compiled from unpatched source code,
    194      1.1     joerg     you probably need to report a bug to your distribution's bug tracking
    195      1.1     joerg     system.
    196      1.1     joerg 
    197      1.1     joerg 
    198  1.1.1.4  christos 4. Translations
    199  1.1.1.4  christos ---------------
    200  1.1.1.4  christos 
    201  1.1.1.4  christos     The xz command line tool and all man pages can be translated.
    202  1.1.1.4  christos     The translations are handled via the Translation Project. If you
    203  1.1.1.4  christos     wish to help translating xz, please join the Translation Project:
    204  1.1.1.4  christos 
    205  1.1.1.4  christos         https://translationproject.org/html/translators.html
    206  1.1.1.4  christos 
    207  1.1.1.4  christos     Updates to translations won't be accepted by methods that bypass
    208  1.1.1.4  christos     the Translation Project because there is a risk of duplicate work:
    209  1.1.1.4  christos     translation updates made in the xz repository aren't seen by the
    210  1.1.1.4  christos     translators in the Translation Project. If you have found bugs in
    211  1.1.1.4  christos     a translation, please report them to the Language-Team address
    212  1.1.1.4  christos     which can be found near the beginning of the PO file.
    213  1.1.1.4  christos 
    214  1.1.1.4  christos     If you find language problems in the original English strings,
    215  1.1.1.4  christos     feel free to suggest improvements. Ask if something is unclear.
    216  1.1.1.4  christos 
    217  1.1.1.4  christos 
    218  1.1.1.4  christos 4.1. Testing translations
    219      1.1     joerg 
    220  1.1.1.4  christos     Testing can be done by installing xz into a temporary directory.
    221      1.1     joerg 
    222  1.1.1.4  christos     If building from Git repository (not tarball), generate the
    223  1.1.1.4  christos     Autotools files:
    224  1.1.1.4  christos 
    225  1.1.1.4  christos         ./autogen.sh
    226  1.1.1.4  christos 
    227  1.1.1.4  christos     Create a subdirectory for the build files. The tmp-build directory
    228  1.1.1.4  christos     can be deleted after testing.
    229  1.1.1.4  christos 
    230  1.1.1.4  christos         mkdir tmp-build
    231  1.1.1.4  christos         cd tmp-build
    232  1.1.1.4  christos         ../configure --disable-shared --enable-debug --prefix=$PWD/inst
    233  1.1.1.4  christos 
    234  1.1.1.4  christos     Edit the .po file in the po directory. Then build and install to
    235  1.1.1.4  christos     the "tmp-build/inst" directory, and use translations.bash to see
    236  1.1.1.4  christos     how some of the messages look. Repeat these  steps if needed:
    237      1.1     joerg 
    238      1.1     joerg         make -C po update-po
    239  1.1.1.4  christos         make -j"$(nproc)" install
    240  1.1.1.4  christos         bash ../debug/translation.bash | less
    241  1.1.1.4  christos         bash ../debug/translation.bash | less -S  # For --list outputs
    242  1.1.1.4  christos 
    243  1.1.1.4  christos     To test other languages, set the LANGUAGE environment variable
    244  1.1.1.4  christos     before running translations.bash. The value should match the PO file
    245  1.1.1.4  christos     name without the .po suffix. Example:
    246  1.1.1.4  christos 
    247  1.1.1.4  christos         export LANGUAGE=fi
    248      1.1     joerg 
    249      1.1     joerg 
    250      1.1     joerg 5. Other implementations of the .xz format
    251      1.1     joerg ------------------------------------------
    252      1.1     joerg 
    253      1.1     joerg     7-Zip and the p7zip port of 7-Zip support the .xz format starting
    254      1.1     joerg     from the version 9.00alpha.
    255      1.1     joerg 
    256  1.1.1.4  christos         https://7-zip.org/
    257  1.1.1.4  christos         https://p7zip.sourceforge.net/
    258      1.1     joerg 
    259      1.1     joerg     XZ Embedded is a limited implementation written for use in the Linux
    260      1.1     joerg     kernel, but it is also suitable for other embedded use.
    261      1.1     joerg 
    262  1.1.1.3     joerg         https://tukaani.org/xz/embedded.html
    263      1.1     joerg 
    264  1.1.1.4  christos     XZ for Java is a complete implementation written in pure Java.
    265  1.1.1.4  christos 
    266  1.1.1.4  christos         https://tukaani.org/xz/java.html
    267  1.1.1.4  christos 
    268      1.1     joerg 
    269      1.1     joerg 6. Contact information
    270      1.1     joerg ----------------------
    271      1.1     joerg 
    272  1.1.1.4  christos     XZ Utils in general:
    273  1.1.1.4  christos       - Home page: https://tukaani.org/xz/
    274  1.1.1.4  christos       - Email to maintainer(s): xz (a] tukaani.org
    275  1.1.1.4  christos       - IRC: #tukaani on Libera Chat
    276  1.1.1.4  christos       - GitHub: https://github.com/tukaani-project/xz
    277  1.1.1.4  christos 
    278  1.1.1.4  christos     Lead maintainer:
    279  1.1.1.4  christos       - Email: Lasse Collin <lasse.collin (a] tukaani.org>
    280  1.1.1.4  christos       - IRC: Larhzu on Libera Chat
    281      1.1     joerg 
    282