Commit Graph

20 Commits

Author SHA1 Message Date
Zoltan Szabadka
bacc734997 Fix some more compiler warnings in the decoder. 2015-10-05 10:23:32 +02:00
Zoltan Szabadka
85fede2f05 Avoid loop in GetNextKey. 2015-10-02 16:40:26 +02:00
Zoltan Szabadka
d3eb6ecb9a Add BROTLI_FREE macro, check malloc status after histogram allocations. 2015-10-02 16:19:30 +02:00
Zoltan Szabadka
10aaa83ffe Fix a bug in ReadHuffmanCode(). 2015-09-28 12:37:35 +02:00
Eugene Klyuchnikov
127aa48a96 Fix bug in decoder.
Minor cleanup.
2015-09-01 12:18:22 +02:00
Lode Vandevenne
db71549ac5 update brotli decoder with latest improvements 2015-08-28 15:20:24 +02:00
Zoltan Szabadka
4b2fd00e24 Use a single lookup table for insert/copy offsets and extra bits.
Remove safe_malloc.c since all the bounds checking is done inside
decode.c now.
2015-08-10 16:39:50 +02:00
Lode Vandevenne
94cd7085f7 brotli decoder performance improvements 2015-08-10 13:35:23 +02:00
Zoltan Szabadka
641bc15882 Speedups and fixes to the decoder.
* Read data by 4-byte runs.
    This resolves unaligned read (Bus error) on arm-android.

  * Get rid of malloc/free in BrotliBuildHuffmanTable.

  * Tweak order of instructions when reading Huffman codes.
2015-06-12 15:12:23 +02:00
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