brotlicffi icon indicating copy to clipboard operation
brotlicffi copied to clipboard

`Decompressor` uses inexistent dictionary API

Open illia-v opened this issue 2 months ago • 1 comments

While I was working on #207, I noticed that the decompressor class allows passing a custom dictionary, but the functionality is not working because lib.BrotliDecoderSetCustomDictionary was dropped since v1.0.9.0.

https://github.com/python-hyper/brotlicffi/blob/75ac96915b8fc18d90177d416a14f1ea4c224630/src/brotlicffi/_api.py#L369-L376

AttributeError: cffi library '_brotlicffi' has no function, constant or global variable named 'BrotliDecoderSetCustomDictionary'. Did you mean: 'BrotliDecoderAttachDictionary'?

It may be possible to use BrotliDecoderAttachDictionary instead of BrotliDecoderSetCustomDictionary.

This functionality has been broken for a few releases, so I hope it doesn't block releasing v1.2.0.0.

illia-v avatar Nov 21 '25 10:11 illia-v

Good catch, this also signals to me that this feature is indeed used by almost no-one. If anyone submits a PR and I can make a 1.2.0.1 release.

sethmlarson avatar Nov 22 '25 20:11 sethmlarson