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 eric.smith
Recipients eric.smith, liad100, rushter
Date 2018-08-14.12:49:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534250955.94.0.56676864532.issue34393@psf.upfronthosting.co.za>
In-reply-to
Content
There are too many types of compression for this to be built-in to json. There's zlib, gzip, bzip, zip, and no doubt dozens of others. How would we chose one, or several? Which to leave out? How to pass in the many parameters to all of these compression algorithms?

As rushter points out, if your current compression library only compresses a file on disk, you should switch to a streaming compressor, like zlib.compressobj or gzip.GzipFile.

If Google Storage won't let you pass a streaming compressor as a parameter, then that should be a feature request to Google. I suspect you can actually pass a streaming compressor to it, but I have't investigated their API.

In any event, compression does not belong in the json library.
History
Date User Action Args
2018-08-14 12:49:15eric.smithsetrecipients: + eric.smith, rushter, liad100
2018-08-14 12:49:15eric.smithsetmessageid: <1534250955.94.0.56676864532.issue34393@psf.upfronthosting.co.za>
2018-08-14 12:49:15eric.smithlinkissue34393 messages
2018-08-14 12:49:15eric.smithcreate