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 12.2 platform.
Download (HTTP): https://github.com/google/brotli/archive/v1.1.0/brotli-1.1.0.tar.gz
Download MD5 sum: 3a6a3dba82a3604792d3cb0bd41bca60
Download size: 500 KB
Estimated disk space required: 33 MB (with python3 bindings)
Estimated build time: 0.3 SBU (with python3 bindings; parallelism=4)
pytest-8.3.2 (for testing Python3 bindings)
Install brotli by running the following commands:
mkdir build && cd build && cmake -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_BUILD_TYPE=Release \ .. && make
To test the results, issue: make test.
Now, as the root
user:
make install
If desired, build the Python3 bindings:
cd .. && sed "/c\/.*\.[ch]'/d;\ /include_dirs=\[/\ i libraries=['brotlicommon','brotlidec','brotlienc']," \ -i setup.py && pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
Install the Python3 bindings as
the root
user:
pip3 install --no-index --find-links=dist --no-cache-dir --no-user Brotli
To test the Python3 binding, issue: pytest.
sed ... -i setup.py:
Stop setup.py
from rebuilding the
entire package all over again, use the already installed libraries
for the Python3 binding instead.