From 83aa24dc8686b62177d776a3baab5f69badc1a78 Mon Sep 17 00:00:00 2001 From: Zoltan Szabadka Date: Thu, 7 May 2015 16:53:43 +0200 Subject: 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. --- setup.py | 1 + 1 file changed, 1 insertion(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 1f99f6e..37a9e2b 100644 --- a/setup.py +++ b/setup.py @@ -141,6 +141,7 @@ brotli = Extension("brotli", "dec/dictionary.h", "dec/huffman.h", "dec/prefix.h", + "dec/port.h", "dec/safe_malloc.h", "dec/streams.h", "dec/transform.h", -- cgit v1.1