mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Dynamically generate the compression dictionary? #516
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Timmmm on GitHub (Sep 10, 2024).
Hi, the Chrome guys have quite stringent binary size requirements and are worried about the size of the dictionary used for compression. We think they're talking about this pre-hashed dictionary.
I just thought I'd check with you guys: presumably that dictionary only depends on the already-present decompression dictionary (which they don't seem to have a problem with). Can it be generated at runtime instead of embedded in the binary?
(They may not be talking about that tbf since they mentioned 190kB binary size and that table is only 64kB; maybe the compression code itself is 130kB?)
@eustas commented on GitHub (Jun 26, 2025):
This question have already raised several times. Yes, it is possible to make this data dynamically generated, but the fragile point is "singleton guarantees", and even worse "static resource freeing".
I will check, how much time it will take to implement, but the solution (API wise) will look like -
BrotliEncoderGlobalInit/BrotliEncoderGlobalFreeand it will be embedders sole responsibility to invoke those not too early and not too late. Likely for static linking only...@eustas commented on GitHub (Sep 4, 2025):
Added API for early/lazy static tables initialization