python-zstandard
python-zstandard copied to clipboard
Implement `max_length` argument on `ZstdDecompressionObj::decompress()`
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.