Add parameter for set maximum length after decompress #503

Open
opened 2026-01-29 20:44:56 +00:00 by claunia · 0 comments
Owner

Originally created by @ikrivosheev on GitHub (Mar 27, 2024).

Hello! It'll be great to have parameter max_length in Decompressor (http://python-hyper.org/projects/brotlipy/en/latest/api.html#brotli.Decompressor.decompress) like in python zlib: https://docs.python.org/3/library/zlib.html#zlib.Decompress.decompress.

The parameter mean that the return value will be no longer than max_length. I need it for use in http client.
Related issue in aiohttp: https://github.com/aio-libs/aiohttp/issues/8248

Originally created by @ikrivosheev on GitHub (Mar 27, 2024). Hello! It'll be great to have parameter `max_length` in `Decompressor` (http://python-hyper.org/projects/brotlipy/en/latest/api.html#brotli.Decompressor.decompress) like in python zlib: https://docs.python.org/3/library/zlib.html#zlib.Decompress.decompress. The parameter mean that the return value will be no longer than `max_length`. I need it for use in http client. Related issue in aiohttp: https://github.com/aio-libs/aiohttp/issues/8248
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#503