Brotli Compression Algorithm

Brotli Compression Algorithm

github.com

2

About this website

Brotli is a generic-purpose lossless compression algorithm developed by Jyrki Alakuijala and Zoltan Szabadka at Google, designed as a successor to gzip (DEFLATE) for HTTP content encoding. Released in September 2015, Brotli compresses data with a combination of a modern variant of the LZ77 algorithm, Huffman coding, and second-order context modeling, achieving compression ratios 20-26% higher than gzip for typical web content. Standardized as RFC 7932, Brotli is supported by all major browsers (Chrome, Firefox, Edge, Safari, Opera) and web servers (Nginx, Apache, Caddy). Key features: predefined dictionary of 120KB containing common web text (HTML tags, CSS, JavaScript keywords, common English words) that dramatically improves compression of small files by pre-populating the compression window with frequently occurring data. Second-order context modeling using 8-bit context for more accurate probability predictions, especially beneficial for text. Maximum window size of 16MB (compared to gzip's 32KB), enabling better matching on larger files. Static and dynamic Huffman codes for optimal encoding speed and ratio. Quality levels 0-11, with level 11 providing maximum compression (slowest) and level 5 as default for a good speed/ratio balance. Content-Encoding: br header for HTTP transfer encoding. TLS extension (ALPN) for advertising Brotli support during TLS handshake. WOFF2 web font format uses Brotli internally for font compression, achieving 30% better ratios than WOFF1 (zlib). Performance: Brotli level 11 achieves smaller output than xz/LZMA for many web text files. Decompression speed comparable to gzip (100-400 MB/s). Used by all major CDNs (Cloudflare, Akamai, Fastly) and websites. Open source under MIT.

Statistics

2
Views
0
Clicks
0
Like
0
Dislike

Comments

Log In to post a comment

No comments yet. Be the first!