mirror of
https://github.com/google/brotli.git
synced 2024-11-21 19:20:09 +00:00
Brotli compression format
83aa24dc86
* Change order of members of bit reader state structure. * Remove unused includes for assert. Add BROTLI_DCHECK macros and use it instead of assert. * Do not calculate nbits in common case of ReadSymbol. * Introduce and use PREDICT_TRUE / PREDICT_FALSE macros. * Allocate less memory in the brotli decoder if it knows the result size beforehand. Before this, the decoder would always allocate 16MB if the encoder annotated the window size as 22 bit (which is the default), even if the file is only a few KB uncompressed. Now, it'll only allocate a ringbuffer as large as needed for the result file. But only if it can know the filesize, it's not possible to know that if there are multiple metablocks or too large uncompressed metablock. |
||
---|---|---|
dec | ||
docs | ||
enc | ||
python | ||
tests | ||
tools | ||
.gitignore | ||
LICENSE | ||
README.md | ||
setup.py | ||
shared.mk |
brotli
Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression.
The specification of the Brotli Compressed Data Format is defined in the following internet draft: http://www.ietf.org/id/draft-alakuijala-brotli
Brotli is open-sourced under the Apache License, Version 2.0, see the LICENSE file.