This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author llllllllll
Recipients llllllllll
Date 2016-02-18.04:08:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455768500.67.0.379084833673.issue26379@psf.upfronthosting.co.za>
In-reply-to
Content
Adds a keyword only flag to zlib.decompress and zlib.Decompress.decompress which marks that the return type should be a bytearray instead of bytes.

The use case for this is reading compressed data into a mutable array to do further operations without requiring that the user copy the data first. Often, if a user is choosing to compress the data there might be a real cost to copying the uncompressed bytes into a mutable buffer.

The impetus for this change comes from a patch for Pandas (https://github.com/pydata/pandas/pull/12359). I have also worked on a similar feature for blosc, another popular compression library for python (https://github.com/Blosc/python-blosc/pull/107).

My hope is to fix the hacky solution presented in the pandas patch by supporting this feature directly in the compression libraries.

As a side note: this is my first time using the argument clinic and I love it. It was so simple to add this argument, thank you very much for developing such an amazing tool!
History
Date User Action Args
2016-02-18 04:08:20llllllllllsetrecipients: + llllllllll
2016-02-18 04:08:20llllllllllsetmessageid: <1455768500.67.0.379084833673.issue26379@psf.upfronthosting.co.za>
2016-02-18 04:08:20lllllllllllinkissue26379 messages
2016-02-18 04:08:19llllllllllcreate