Reduce BrotliEnc library size?

15 views
Skip to first unread message

Anders Klemets

unread,
Jun 16, 2025, 6:39:32 PMJun 16
to Brotli
Hi, I found that the Brotli encoder library is an order of magnitude larger than the decoder library. When compiling using MSVC for a x64 Windows target, brotlienc.lib is about 6 MB in size, whereas brotlidec.lib is only 400 kB in size.

I think the repeated usage of the lookup table in static_dict_lut.h might be what is causing the encoding library to be so much bigger.
Is there a workaround? I would be willing to accept slower compression speeds if it makes the disk footprint of the code smaller.

eus...@google.com

unread,
Sep 1, 2025, 7:45:44 AMSep 1
to Brotli
Hi. Now there is an option to trim statically initialized data that reduces encoder library 780 KiB -> 500 KiB.

Another question, why brotlienc.lib is 6 MB (and brotlidec.lib, it should be around 55 KiB)...

Reply all
Reply to author
Forward
0 new messages