What is Brotli compression

What is Brotli compression

Brotli is an open-source, lossless compression algorithm introduced by Google in 2015.

What is Brotli?

The name of the algorithm comes from the Swiss pastry Spanisch Brötli.

Brotli is built using a modern version of the LZ77 algorithm, Huffman coding, and 2nd order context modelling.

The algorithm utilizes a dictionary already built into users’ browsers that consists of almost 100,000 commonly used phrases and word fragments on the web. Due to this, it is possible to reduce the size of the files being processed.

How content compressed with Brotli is delivered

Gcore CDN not only supports the transfer of content compressed with Brotli, but it can also compress files directly using origin shielding.

In this case, an uncompressed version of a file is taken from the origin, then it is compressed on the CDN side and distributed to users whose browsers support Brotli compression.

Learn more about compression on CDN.

What is Brotli compression

Data types that can be compressed with Brotli on CDN:

  • application/jаvascript
  • application/json
  • application/x-jаvascript
  • application/xml
  • application/xml+rss
  • text/css
  • text/html
  • text/jаvascript
  • text/plain
  • text/xml
  • application/vnd.ms-fontobject
  • application/x-font-ttf
  • image/x-icon

Browsers that support Brotli

Brotli works for 9 out of 10 Internet users because it is supported by almost all Chromium-based browsers: Chrome, Opera, Firefox, Yandex.Browser, and others.

What is Brotli compression

Advantages of Brotli

Brotli is 20 to 26 percent more efficient than Zopfli and 20 percent better than Gzip in terms of compressing HTML, CSS, and jаvascript files.

What is Brotli compression
Google comparative study

The new algorithm reduces bandwidth consumption and helps load content faster. Speeding up a webpage’s loading time isn’t the only advantage.

Brotli also helps reduce transmitted traffic and conserves the battery power of mobile devices.

How to activate Brotli

By default, this option is disabled. To enable it, open “Advanced settings”, find the “Content” section, and click “Add option”.

What is Brotli compression

Select the desired option and save the changes.

The minimum size of a file that can be compressed is 128 bytes.

This feature is free, but it can only be used when origin shielding is enabled (additional protection against high load is available for €45 per web resource).

Learn more about the costs of additional CDN features.

Please note that upon activation, compression is performed using origin shielding. If no precache server is used for the resource, compression is not performed even if the option is enabled.

To enable the “Origin Shielding” option, contact technical support.

Sign up for CDN

Subscribe to our newsletter

Stay informed about the latest updates, news, and insights.