aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorZoltan Szabadka <szabadka@google.com>2015-06-12 16:45:17 +0200
committerZoltan Szabadka <szabadka@google.com>2015-06-12 16:45:17 +0200
commit66098830a2bd9656ce704948f79251012b9902b0 (patch)
treec3d7318474c9151ae6dc8c3b002458a3df0f7715 /setup.py
parent0fd2df4f4df923466afb7447aa54c2f7de64e4c5 (diff)
downloadbrotli-66098830a2bd9656ce704948f79251012b9902b0.zip
brotli-66098830a2bd9656ce704948f79251012b9902b0.tar.gz
brotli-66098830a2bd9656ce704948f79251012b9902b0.tar.bz2
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.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py2
1 files changed, 2 insertions, 0 deletions
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",