
LZMA Utils installation instructions
------------------------------------

    Copyright (C) 2007 Lasse Collin

    Copying and distribution of this file, with or without modification,
    are permitted in any medium without royalty provided the copyright
    notice and this notice are preserved.


0. For newbies

    If you are not familiar with `configure' scripts, read the file
    INSTALL.generic first.


1. `configure' options

    In most cases, the default --enable/--disable/--with/--without options
    are what you want. Don't touch them without a need.


1.1. liblzma (compression/decompression library)

    --disable-encoder
                Do not compile the encoder component of liblzma. This
                implies --disable-match-finders. If you need only
                the decoder, you can decrease the library size
                dramatically with this option.

                The default is to build the encoder.

    --disable-decoder
                Do not compile the decoder component of liblzma.

                The default is to build the decoder.

    --enable-filters=
                liblzma supports several filters (algorithms). See
                README.liblzma for a little more information about these.

                The default is to build all the filters.

    --enable-match-finders=
                liblzma includes two categories of match finders:
                hash chains and binary trees. Hash chains (hc3 and hc4)
                are quite fast but they don't provide the best compression
                ratio. Binary trees (bt2, bt3 and bt4) give excellent
                compression ratio, but they are slower and need more
                memory than hash chains.

                You need to enable at least one match finder to build the
                LZMA filter encoder. Usually hash chains are used only in
                the fast mode, while binary trees are used to when the best
                compression ratio is wanted.

                The default is to build all the match finders.


1.2. libzfile (I/O library in C supporting multiple compression formats)

    --with-zlib[=path]

    --with-libbz2[=path]


2.  Compiling the command line tool statically against liblzma

    The command line tool uses only hc3, hc4 and bt4 match finders.
    To make the binary as small as possible, you should use the configure
    flag

        ./configure \
                --disable-shared \
                --enable-static \
                --enable-match-finders=hc3,hc4,bt4

3.  Notes for packagers

    This section is aimed for those who create and maintain software
    packages for distribution.

    The default CFLAGS include "-O2", which should be a safe choice.
    For maximum speed, consider "-O3 -fomit-frame-pointer -funroll-loops".
    For me, these flags make LZMA decoding 5-8% faster compared to
    plain "-O2". Those flags are stable at least on x86 and GCC 3.4.6.

    If you apply any patches, please let me know about them. Maybe they
    can be combined in the official source. Portability fixes are
    welcome except that I don't want to get a huge patch to convert
    the source from C99 to C89 (also known as ANSI-C). I'm interested
    even in smallest fixes like typos or patches to avoid compiler warnings.
FIXME
