mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Is there a way to create a custom dictionary? #33
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 @DiThi on GitHub (Sep 23, 2015).
Most files of our project have data that is not text, but delta-encoded floats and shorts, and I think it would greatly benefit from creating a dictionary with the most common strings.
Related #165
@wizzard0 commented on GitHub (Sep 23, 2015):
👍
@eustas commented on GitHub (Sep 24, 2015):
Use BrotliCompressWithCustomDictionary / BrotliSetCustomDictionary API
@DiThi commented on GitHub (Sep 24, 2015):
@eustas Thanks!
Though, I can't find any documentation or examples. Can the custom dictionary be anything? Is it enough to concatenate a bunch of common data together?
@eustas commented on GitHub (Sep 24, 2015):
Custom dictionary could contain any data. Like with any LZ codec it is used as an initial window data.
Though I could recommend not to place short pattern last few bytes of custom dictionary, because it may be the "blind" zone of encoder.
@yangxiaomin08 commented on GitHub (May 19, 2016):
Asking the same question, is there any tool that could help to generate custom dictionary for specified domain?
@eustas commented on GitHub (May 20, 2016):
You could try this: https://github.com/vkrasnov/dictator