Updated: 28 September 2026 · Applies to: Debian 12

Debian 9 and 10 are no longer supported, so this guide now uses Debian 12 (Ubuntu 24.04 works the same way).

Brotli compresses text better than gzip. On current Debian and Ubuntu you do not need to compile it: the command-line tool is packaged.

Install the tool

apt install brotli
brotli -k style.css        # creates style.css.br
brotli -d style.css.br      # decompress

Build from source (if you need the latest version)

apt install git cmake build-essential
git clone https://github.com/google/brotli.git && cd brotli
mkdir out && cd out && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . --config Release --target install

Tip: For websites, enable Brotli in the web server or CDN rather than compressing files by hand.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)