Introduction to Brotli

Brotli provides a general-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. Its libraries are particularly used for WOFF2 fonts on webpages.

This package is known to build and work properly using an LFS-11.0 platform.

Package Information

Brotli Dependencies



User Notes:

Installation of Brotli

At first, fix an issue in pkg-config files:

sed -i 's@-R..libdir.@@' scripts/*

Install brotli by running the following commands:

mkdir out &&
cd    out &&

      -DCMAKE_BUILD_TYPE=Release  \
      ..  &&

To test the results, issue: make test.

If desired, build the Python3 bindings:

pushd ..               &&
python3 build &&

The python tests are missing most of the necessary testdata files and therefore 240 of 311 tests fail. If you nevertheless wish to test the bindings, go back to the top-level directory and issue: python3 test.

Now, as the root user:

make install &&
cd ..

If you have built the python bindings, install them as the root user:

python3 install --optimize=1


Installed Programs: brotli
Installed Libraries: libbrotlicommon{-static.a,.so}, libbrotlidec{,-static.a,.so}, and libbrotlienc{,-static.a,.so}
Installed Directory: /usr/include/brotli

Short Descriptions


can compress or decompress files, or test the integrity of compressed files


is the Brotli common dictionary library


is the Brotli decoder library


is the Brotli common encoder library

Last updated on Mon Sep 6 19:42:49 2021 +