Brotli is a lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding, and second-order context modeling, achieving compression ratios comparable to the best general-purpose compression methods while maintaining speed similar to deflate.
The tool solves the problem of achieving dense compression for data transmission and storage. It combines three techniques: a modern LZ77 variant for pattern matching, Huffman coding for entropy encoding, and second-order context modeling to improve compression ratios. The algorithm is defined in RFC 7932 and works as a stream format without embedded metadata like checksums or uncompressed data length.
Brotli suits projects requiring efficient compression where file size matters more than absolute speed. It is widely available through standard package managers on Linux and macOS, and can be installed via vcpkg, built with CMake or Bazel, or installed as a Python module through pip. The tool is appropriate for web content delivery, data archival, and any scenario where compression density outweighs decompression latency concerns. Users should be aware that as a stream format, it does not include checksums or uncompressed length information, meaning raw ranges of the compressed stream could theoretically be modified without detection.
The project maintains continuous integration through automated build and test workflows. The codebase undergoes fuzzing to identify potential vulnerabilities and edge cases in the compression and decompression logic.