python-zstandard icon indicating copy to clipboard operation
python-zstandard copied to clipboard

Implement `max_length` argument on `ZstdDecompressionObj::decompress()`

Open indygreg opened this issue 3 years ago • 0 comments

Python 3.6 added an optional max_length argument on decompressor's decompress() method. e.g. https://docs.python.org/3/library/zlib.html#zlib.Decompress.decompress.

This argument can reduce a lot of (but not all) of the performance badness in the API design of decompress() by allowing implementations to allocate a single output buffer of size max_length to avoid excessive memory allocations/copies.

We should support this optional argument.

indygreg avatar Jun 20 '22 19:06 indygreg