Commit Graph

11 Commits

Author SHA1 Message Date
Zoltan Szabadka
83aa24dc86 Speed and memory usage improvements for the decoder.
* 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.
2015-05-07 16:53:43 +02:00
Lode Vandevenne
8270250b40 support for partial input (streaming) 2015-03-20 16:13:15 +01:00
Lode Vandevenne
81cb09f1b3 separate the licenses from documentation 2015-03-20 15:44:15 +01:00
Zoltan Szabadka
0454ab4ec0 Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last month. Most important changes:

   * Fixes to the spec.
   * Change of code length code order.
   * Use a 2-level Huffman lookup table in the decoder.
   * Faster uncompressed meta-block decoding.
   * Optimized encoding of the Huffman code.
   * Detection of UTF-8 input encoding.
   * UTF-8 based literal cost modeling for improved
     backward reference selection.
2014-02-14 15:04:23 +01:00
Zoltan Szabadka
d01c71c4ad Fix -Wconversion compiler warnings in the brotli decoder. 2014-01-08 12:34:35 +01:00
Zoltan Szabadka
d762bc6845 Bug fixes for the brotli encoder and decoder. 2014-01-06 16:01:57 +01:00
Zoltan Szabadka
b8a1008569 Use C-style comments in the brotli decoder. 2013-12-16 14:45:57 +01:00
Zoltan Szabadka
354349d7ae Fix Microsoft VisualStudio build of brotli
- Move all variable declarations to the beginning of the block
- #ifdef-out read/write calls
2013-12-13 10:39:46 +01:00
Zoltan Szabadka
c6b9c7c5c8 Updates to Brotli compression format, decoder and encoder
This commit contains a batch of changes that were made to the Brotli
compression algorithm in the last three weeks. Most important changes:

  * Added UTF8 context model for good text compression.
  * Simplified context modeling by having only 4 context modes.
  * Per-block context mode selection.
  * Faster backward copying and bit reading functions.
  * More efficient histogram coding.
  * Streaming support for the decoder and encoder.
2013-11-15 19:02:17 +01:00
Zoltan Szabadka
e0346c8262 Fix name collisions with libwebp.
Prefix all externally visible function names with Brotli and
make all other functions static.
2013-10-17 12:41:36 +02:00
Zoltan Szabadka
8f30907d0f Add brotli decompressor
This commit is for the decoder for brotli compression format.
Brotli is a generic byte-level compression algorithm.
2013-10-11 10:26:07 +02:00