Trisha Shetty (Editor)

Brotli

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Brotli

Brotli is an open source data compression library developed by Jyrki Alakuijala and Zoltán Szabadka. Brotli is based on a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.

Contents

It can be used to speed up browsing the Web in Chrome, Opera, Firefox, or Edge. Like zopfli, another compression algorithm from Google, brotli is named after a Swiss bakery product, brötli.

About

Brotli was first released in 2015 for off-line compression of web fonts. The version of Brotli released in September 2015 by the Google software engineers contained enhancements in generic lossless data compression, with particular emphasis on use for HTTP compression. The encoder was partly rewritten, with the result that the compression ratio improved, both the encoder and the decoder have been sped up, the streaming API was improved, more compression quality levels have been added. Additionally, the new release shows performance improvements across platforms, with decoding memory reduction.

Unlike most general purpose compression algorithms, Brotli uses a pre-defined 120 kilobyte dictionary. The dictionary contains over 13000 common words, phrases and other substrings derived from a large corpus of text and HTML documents. Using a pre-defined dictionary has been shown to increase compression where a file mostly contains commonly-used words.

Replacing deflate with brotli typically gives an increase of 20% in compression density for text files, while compression and decompression speeds are roughly unchanged. Streams compressed with Brotli have the content encoding type "br".

Browser

  • Google Chrome has supported Brotli since version 49.
  • Microsoft Edge supports Brotli since version 15.
  • Mozilla Firefox implemented Brotli in version 44.
  • Opera supports Brotli since version 36.
  • Safari, no public commitment as of October 2016.
  • Web server

  • Apache HTTP Server, in final stages of development.
  • Microsoft IIS, no official support nor commitment to implement. There exists a community module that adds support.
  • nginx, no official support nor commitment to implement. A ngx_brotli module is provided by Google Inc..
  • Node.js, no official support but there exists a community module [shrink-ray https://www.npmjs.com/package/shrink-ray] that adds support.
  • References

    Brotli Wikipedia


    Similar Topics