Skip to content

fix: use BrotliDecoderAttachDictionary for custom dictionaries - #229

Open
rome-xi wants to merge 1 commit into
python-hyper:mainfrom
rome-xi:contrib/brotlicffi-215
Open

rome-xi wants to merge 1 commit into
python-hyper:mainfrom
rome-xi:contrib/brotlicffi-215

Conversation

@rome-xi

@rome-xi rome-xi commented Aug 24, 2026

Copy link
Copy Markdown

Closes #215.

Decompressor(dictionary=...) still called the removed BrotliDecoderSetCustomDictionary, which raises AttributeError on current libbrotli. Switch to BrotliDecoderAttachDictionary with BROTLI_SHARED_DICTIONARY_RAW, expose the API in the CFFI cdef, and add a regression test.

Signed-off-by: rome-xi <rome-xi@users.noreply.github.com>
@rome-xi
rome-xi force-pushed the contrib/brotlicffi-215 branch from b3b778d to 13dbfb7 Compare November 19, 2026 05:47
@rome-xi

rome-xi commented Nov 19, 2026

Copy link
Copy Markdown
Author

Rebased onto current main (now includes the libbrotli 1.2.1 upgrade and #232). The decoder change is the same: BrotliDecoderAttachDictionary instead of the removed BrotliDecoderSetCustomDictionary, plus the existing regression tests. Happy to adjust if you'd like a different shape.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Decompressor uses inexistent dictionary API

1 participant