Eric V. Smith <e...@trueblade.com> added the comment:

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.

----------
nosy: +eric.smith
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34393>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to