andybalholm / brotli

Pure Go Brotli encoder and decoder
MIT License
617 stars 52 forks source link

Shared dictionary support? #38

Open espoal opened 2 years ago

espoal commented 2 years ago

In theory google/brotli has support for shared dictionaries. In practice I've not seen any example anywhere.

Does this package support shared dictionaries? Could you maybe provide an example?

andybalholm commented 2 years ago

Brotli uses a pre-defined static dictionary. I don't think there is any support for using user-generated dictionaries like zstd does.

andybalholm commented 2 years ago

Oh, now I see that a shared dictionary feature was added a while back. My Go version of the library doesn't have any support for it.

espoal commented 2 years ago

Is there any plan to add support? If I understand correctly, this project is generated via c2go so in theory it should be possible to add (automatically?) the API needed.

Or maybe you tell me there's a lot of legwork to do?

andybalholm commented 2 years ago

It was generated with c2go, but changes have been made since. We can't just regenerate it from the C version now. I don't have any plans to add it, but pull requests are welcome.