#### Linux From Scratch - Version 7.9

### Chapter 6. Installing Basic System Software

- Prev

  Groff-1.22.3

- Next

  GRUB-2.02~beta2

- Up
- Home

# 6.53. Xz-5.2.2

The Xz package contains programs for compressing and decompressing files. It provides capabilities for the lzma and the newer xz compression formats. Compressing text files with xz yields a better compression percentage than with the traditional gzip or bzip2 commands.

Approximate build time: 0.2 SBU
Required disk space: 15.1 MB

## 6.53.1. Installation of Xz

First, fix an internal problem:

    sed -e '/mf\.buffer = NULL/a next->coder->mf.size = 0;' \
         -i src/liblzma/lz/lz_encoder.c

Prepare Xz for compilation with:

    ./configure --prefix=/usr    \
                --disable-static \
                --docdir=/usr/share/doc/xz-5.2.2

Compile the package:

    make

To test the results, issue:

    make check

Install the package and make sure that all essential files are in the correct directory:

    make install
    mv -v   /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin
    mv -v /usr/lib/liblzma.so.* /lib
    ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so

## 6.53.2. Contents of Xz

Installed programs: lzcat (link to xz), lzcmp (link to xzdiff), lzdiff (link to xzdiff), lzegrep (link to xzgrep), lzfgrep (link to xzgrep), lzgrep (link to xzgrep), lzless (link to xzless), lzma (link to xz), lzmadec, lzmainfo, lzmore (link to xzmore), unlzma (link to xz), unxz (link to xz), xz, xzcat (link to xz), xzcmp (link to xzdiff), xzdec, xzdiff, xzegrep (link to xzgrep), xzfgrep (link to xzgrep), xzgrep, xzless, and xzmore
Installed libraries: liblzma.so
Installed directories: /usr/include/lzma and /usr/share/doc/xz-5.2.2

### Short Descriptions

lzcat | Decompresses to standard output
lzcmp | Runs cmp on LZMA compressed files
lzdiff | Runs diff on LZMA compressed files
lzegrep | Runs egrep on LZMA compressed files
lzfgrep | Runs fgrep on LZMA compressed files
lzgrep | Runs grep on LZMA compressed files
lzless | Runs less on LZMA compressed files
lzma | Compresses or decompresses files using the LZMA format
lzmadec | A small and fast decoder for LZMA compressed files
lzmainfo | Shows information stored in the LZMA compressed file header
lzmore | Runs more on LZMA compressed files
unlzma | Decompresses files using the LZMA format
unxz | Decompresses files using the XZ format
xz | Compresses or decompresses files using the XZ format
xzcat | Decompresses to standard output
xzcmp | Runs cmp on XZ compressed files
xzdec | A small and fast decoder for XZ compressed files
xzdiff | Runs diff on XZ compressed files
xzegrep | Runs egrep on XZ compressed files files
xzfgrep | Runs fgrep on XZ compressed files
xzgrep | Runs grep on XZ compressed files
xzless | Runs less on XZ compressed files
xzmore | Runs more on XZ compressed files
`liblzma` | The library implementing lossless, block-sorting data compression, using the Lempel-Ziv-Markov chain algorithm

- Prev

  Groff-1.22.3

- Next

  GRUB-2.02~beta2

- Up
- Home