Brotli
   HOME

TheInfoList



OR:

Brotli is a lossless data compression algorithm developed by
Google Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
. It uses a combination of the general-purpose
LZ77 LZ77 and LZ78 are the two lossless data compression algorithms published in papers by Abraham Lempel and Jacob Ziv in 1977 and 1978. They are also known as LZ1 and LZ2 respectively. These two algorithms form the basis for many variations includin ...
lossless compression Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits statistic ...
algorithm,
Huffman coding In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code proceeds by means of Huffman coding, an algori ...
and 2nd-order context modelling. Brotli is primarily used by
web servers A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiates ...
and
content delivery networks A content delivery network, or content distribution network (CDN), is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially re ...
to compress HTTP content, making internet websites load faster. A successor to
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and in ...
, it is supported by all major web browsers and has become increasingly popular, as it provides better compression than gzip. Browsers currently support it over HTTPS only.


History

Google employees Jyrki Alakuijala and Zoltán Szabadka initially developed Brotli in 2013 to decrease the size of transmissions of
WOFF The Web Open Font Format (WOFF) is a font format for use in web pages. WOFF files are OpenType or TrueType fonts, with format-specific compression applied and additional XML metadata added. The two primary goals are first to distinguish font file ...
web font. Alakuijala and Szabadka completed the Brotli specification during 20132016. The specification was accompanied with a reference implementation developed by two additional authors, Evgenii Kliuchnikov and Lode Vandevenne, who had previously developed Google's
zopfli Zopfli is a data compression library that performs Deflate, gzip and zlib data encoding. It achieves higher compression ratios than mainstream Deflate and zlib implementations at the cost of being slower. Google first released Zopfli in February ...
implementation of deflate and
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and in ...
compatible compression in 2013.. Unlike zopfli, which was a reimplementation of an existing data format specification, Brotli was a new data format and allowed the authors to improve compression ratios even further. The Brotli specification was generalized in September 2015 for HTTP stream compression (content-encoding type "br"). The
Internet Engineering Task Force The Internet Engineering Task Force (IETF) is a standards organization for the Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster or requirements and a ...
approved the Brotli compressed data format specification as an informational
request for comment A Request for Comments (RFC) is a publication in a series from the principal technical development and standards-setting bodies for the Internet, most prominently the Internet Engineering Task Force (IETF). An RFC is authored by individuals or g ...
() in July 2016.. The Brotli data format is an integral part of the 2nd iteration of the
Web Open Font Format The Web Open Font Format (WOFF) is a font format for use in web pages. WOFF files are OpenType or TrueType fonts, with format-specific compression applied and additional XML metadata added. The two primary goals are first to distinguish font fi ...
, which was recognized in a 2021 Technology & Engineering Emmy Award from the National Academy of Television Arts & Sciences for font technology standardization at W3C. Brotli support has been added over the years to web browsers, with 96% of worldwide users using a browser that supports the format, as of July 2022.


About

Brotli was first released in 2013 for off-line compression of
web fonts Web typography is the use of fonts on the World Wide Web. When HTML was first created, font faces and styles were controlled exclusively by the settings of each web browser. There was no mechanism for individual Web pages to control font display ...
. Brotli was a continuation of the development of
zopfli Zopfli is a data compression library that performs Deflate, gzip and zlib data encoding. It achieves higher compression ratios than mainstream Deflate and zlib implementations at the cost of being slower. Google first released Zopfli in February ...
, which is a
zlib zlib ( or "zeta-lib", ) is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also ...
-compatible implementation of the standard
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and in ...
and deflate specifications. Brotli allows a denser packing than gzip and deflate because of several algorithmic and format-level improvements: the use of context models for literals and copy distances, describing copy distances through past distances, use of move-to-front queue in entropy code selection, joint-entropy coding of literal and copy lengths, the use of graph algorithms in block splitting, and a larger backward reference window are example improvements. The Brotli specification was generalized in September 2015 for HTTP stream compression (content-encoding type "br"). This generalized iteration also improved the compression ratio by using a predefined dictionary of frequently used words and phrases. The version of Brotli released in September 2015 by the Google software engineers contained enhancements in generic
lossless data compression Lossless compression is a class of data compression that allows the original data to be perfectly reconstructed from the compressed data with no loss of information. Lossless compression is possible because most real-world data exhibits statistic ...
, with particular emphasis on use for
HTTP compression HTTP compression is a capability that can be built into web servers and web clients to improve transfer speed and bandwidth utilization. HTTP data is compressed before it is sent from the server: compliant browsers will announce what methods are ...
. 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, and 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 predefined dictionary, roughly 120 KiB in size, in addition to the dynamically populated ("sliding window") dictionary. The predefined dictionary contains over 13000 common words, phrases and other substrings derived from a large
corpus Corpus is Latin for "body". It may refer to: Linguistics * Text corpus, in linguistics, a large and structured set of texts * Speech corpus, in linguistics, a large set of speech audio files * Corpus linguistics, a branch of linguistics Music * ...
of text and HTML documents. Using a predefined dictionary has been shown to increase compression where a file mostly contains commonly used words. Brotli's sliding window is limited to 16 MiB. This enables decoding on mobile phones with limited resources, but makes Brotli underperform on compression benchmarks having larger files. The constraints of the small window size can be alleviated by using ''Large Window Brotli'', which is not compatible with RFC7932 (Brotli proper). Streams compressed with Brotli have the content encoding type "br". While Google's ''zopfli'' implementation of the deflate compression algorithm is named after zöpfli, the
Swiss German Swiss German (Standard German: , gsw, Schwiizerdütsch, Schwyzerdütsch, Schwiizertüütsch, Schwizertitsch Mundart,Because of the many different dialects, and because there is no defined orthography for any of them, many different spelling ...
word for a snack-sized braided buttery bread, ''brotli'' is named after brötli, the Swiss German word for a
bread roll Bread is a staple food prepared from a dough of flour (usually wheat) and water, usually by baking. Throughout recorded history and around the world, it has been an important part of many cultures' diet. It is one of the oldest human-made foo ...
.. Google's own implementation of the Brotli specification was released under the terms of the permissive free software
MIT license The MIT License is a permissive free software license originating at the Massachusetts Institute of Technology (MIT) in the late 1980s. As a permissive license, it puts only very limited restriction on reuse and has, therefore, high license comp ...
in 2016. A formal validation of the Brotli specification was independently implemented by
Mark Adler Mark Adler (born 1959) is an American software engineer. He is best known for his work in the field of data compression as the author of the Adler-32 checksum function, and a co-author together with Jean-loup Gailly of the zlib compression librar ...
, one of the co-authors of the
zlib zlib ( or "zeta-lib", ) is a software library used for data compression. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also ...
/
gzip gzip is a file format and a software application used for file compression and decompression. The program was created by Jean-loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and in ...
compression format and library. Adler's implementation was released under the terms of the similarly permissive Apache license. Other implementations of the specification also exist, including one in the source-to-source
haxe Haxe is an open source high-level cross-platform programming language and compiler that can produce applications and source code, for many different computing platforms from one code-base. It is free and open-source software, released under the ...
language. Brotli is available as a port for Android in a terminal interface with its own
shared library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subr ...
. Brotli compression is generally used as an alternative to gzip, as Brotli provides better overall compression. Compared to gzip compression, JavaScript files compressed with Brotli are roughly 15% smaller, HTML files are around 20% smaller, and CSS files are around 16% smaller.


Industry support


Browsers and other clients

*
Mozilla Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current and a ...
introduced support for the "br" content-encoding method in version 44 (released on 26 January 2016). *
Google Chrome Google Chrome is a cross-platform web browser developed by Google. It was first released in 2008 for Microsoft Windows, built with free software components from Apple WebKit and Mozilla Firefox. Versions were later released for Linux, macOS ...
has supported the "br" content-encoding method since version 50 (released on 20 April 2016).. *
Opera Opera is a form of theatre in which music is a fundamental component and dramatic roles are taken by singers. Such a "work" (the literal translation of the Italian word "opera") is typically a collaboration between a composer and a librett ...
has supported the "br" content-encoding method since version 38 (released 8 June 2016). *
Microsoft Edge Microsoft Edge is a proprietary, cross-platform web browser created by Microsoft. It was first released in 2015 as part of Windows 10 and Xbox One and later ported to other platforms as a fork of Google's Chromium open-source project: Android ...
has supported the "br" content-encoding method since version 15 (released on 5 April 2017). *
Safari A safari (; ) is an overland journey to observe wild animals, especially in eastern or southern Africa. The so-called "Big Five" game animals of Africa – lion, leopard, rhinoceros, elephant, and Cape buffalo – particularly form an importa ...
has supported the "br" content-encoding method since version 11 (released on 5 October 2017). *
cURL cURL (pronounced like "curl", UK: , US: ) is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name stands for "Client URL". History cURL was fi ...
has a compile-time option to support the "br" content-encoding method using libbrotli as of version 7.57, released on 29 November 2017. *
7zip 7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own archive format called 7 ...
is available extended with Brotli by 7zip-zstd. *
PeaZip PeaZip is a Free and open-source software, free and open-source file manager and file archiver for Microsoft Windows, ReactOS, Linux, MacOS and BSD made by Giorgio Tani. It supports its native #Native archive format, PEA archive format (featurin ...
supports Brotli .BR format for compression and extraction


Web servers

* For
Apache HTTP Server The Apache HTTP Server ( ) is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache So ...
, the "br" content-encoding method has been supported by the
mod_brotli
' module since version 2.4.26. *
Microsoft IIS Internet Information Services (IIS-pronounced 2S, formerly Internet Information Server) is an extensible web server software created by Microsoft for use with the Windows NT family. IIS supports HTTP, HTTP/2, HTTPS, FTP, FTPS, SMTP and NNTP. ...
has a

' supported extension since May 2018 that adds support for the "br" content-encoding method. * Microsoft Azure, Microsoft Azure Front Door can dynamically compress content on the edge using Brotli since its launch on April 17, 2019. *
nginx Nginx (pronounced "engine x" ) is a web server that can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. The software was created by Igor Sysoev and publicly released in 2004. Nginx is free and open-source software ...
has a
ngx_brotli
' module provided by Google since December 2016. *
Node.js Node.js is an open-source server environment. Node.js is cross-platform and runs on Windows, Linux, Unix, and macOS. Node.js is a back-end JavaScript runtime environment. Node.js runs on the V8 JavaScript Engine and executes JavaScript code o ...
features a built-in native en- and decoder since version 11.7.0, which can be used to support the "br" content-encoding. *
Amazon CloudFront Amazon CloudFront is a content delivery network (CDN) operated by Amazon Web Services. Content delivery networks provide a globally-distributed network of proxy servers that cache content, such as web videos or other bulky media, more locally t ...
can automatically compress cacheable responses at the edge using Brotli, as of September 2020. * LiteSpeed Web Server has included the "br" content-encoding method for static files only since version 5.2 in July 2017. *
Cloudflare Cloudflare, Inc. is an American content delivery network and DDoS mitigation company, founded in 2009. It primarily acts as a reverse proxy between a website's visitor and the Cloudflare customer's hosting provider. Its headquarters are in San ...
CDN offers a brotli option to compress data between its edge node and the user. *
NaviServer NaviServer is a high performance web server written in C (programming language), C and Tcl. It can be easily extended in either language to create web sites and services; there are over 35 modules available (including database integration or prot ...
br>added support
in version 4.99.17b1 *
Caddy (web server) The Caddy web server is an extensible, cross-platform, open-source web server written in Go. The name "Caddy" refers both to a helper for tedious tasks, and a way to organize multiple parts into a simplified system. At its core, Caddy is an exte ...
Serves statically compressed .br files since version 0.9.4 from December 21st, 2016. *
lighttpd lighttpd (pronounced "lighty") is an open-source web server optimized for speed-critical environments while remaining standards-compliant, secure and flexible. It was originally written by Jan Kneschke as a proof-of-concept of the c10k problem †...
mod_deflate supports .br since 1.4.56 from November 2020.


References

;Notes :- .


External links

* Brotli reference implementation at {{Compression methods Free computer libraries Lossless compression algorithms