From 66098830a2bd9656ce704948f79251012b9902b0 Mon Sep 17 00:00:00 2001 From: Zoltan Szabadka Date: Fri, 12 Jun 2015 16:45:17 +0200 Subject: Use a static hash table to look up dictionary words and transforms. This is used for quality 11, for qualities <= 9 we already have a simpler hash table. The static data size is 252 kB, and this removes the need to initialize a huge hash map at startup, which was the reason why transforms had to be disabled by default. In comparison, the static dictionary itself is 120 kB. This supports every transform, except the kOmitFirstN. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 37a9e2b..795d9b3 100644 --- a/setup.py +++ b/setup.py @@ -102,6 +102,7 @@ brotli = Extension("brotli", "enc/histogram.cc", "enc/literal_cost.cc", "enc/metablock.cc", + "enc/static_dict.cc", "enc/streams.cc", "dec/bit_reader.c", "dec/decode.c", @@ -132,6 +133,7 @@ brotli = Extension("brotli", "enc/prefix.h", "enc/ringbuffer.h", "enc/static_dict.h", + "enc/static_dict_lut.h", "enc/streams.h", "enc/transform.h", "enc/write_bits.h", -- cgit v1.1