python gzip 压缩/解压缩 字符串
import gzip
import StringIO
def gzip_compress(buf):
out = StringIO.StringIO()
with gzip.GzipFile(fileobj=out, mode="w") as f:
import gzip
import StringIO
def gzip_compress(buf):
out = StringIO.StringIO()
with gzip.GzipFile(fileobj=out, mode="w") as f: