mirror of
https://github.com/google/brotli.git
synced 2026-09-22 22:56:08 +00:00
Passing additional dictionary? #453
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 @kovalensky on GitHub (Apr 27, 2023).
This is kind of a question I had for a long time.
I have hundreds of thousands of files on my web server compressed by gzip and returned to clients, they are sharing the same extension format, the thing is every one of those files contains their own dictionary inside which is wasting additional space (calculated unnecessary dictionary data ~450GB), with gzip it's not possible to provide a proper dictionary; it's kinda possible but not a proper simple way I'm searching for (predefined index).
So my question is:
Is it possible to provide custom predefined built-in dictionary before compressing, so that only its byte address references would be saved inside compressed data, and Brotli would also analyze data for creating dynamic dictionary, and when sending our compressed data to user's browser we could join this custom built-in dictionary with it?
Tell me if you couldn't catch with my explanation.
Sorry if this an odd question.
@eustas commented on GitHub (May 10, 2023):
Hello. Brotli encoder/decoder allows attaching dictionaries.
See
-Dparameter in brotli CLI. For HTTP currentlybrContent-Encodingdoes not allow using dictionaries. We have plans on introducingsbrContent-Encodingthat would allow sharing dictionaries between web-server and browser. That would significantly improve compression density for the use-case you have described.