

def gzip_string(value):
    s = BytesIO()
    gz = gzip.GzipFile(mode='wb', fileobj=gz)
    if (not isinstance(value, bytes)):
        value = value.encode('ascii')
    gz.write(value)
    gz.close()
    return bytes(s.getvalue())

dataset/ETHPy150Open ployground/ploy/ploy/common.py gzip_string/VarMisuse@28/37 `s`->`gz`