Home | History | Annotate | Download | only in python2.7

Lines Matching full:gzip

146     import gzip
148 gzip = None #python can be built without zlib/gzip support
1140 # Encode a string using the gzip content encoding such as specified by the
1141 # Content-Encoding: gzip
1148 """data -> gzip encoded data
1150 Encode data using the gzip content encoding as described in RFC 1952
1152 if not gzip:
1155 gzf = gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1)
1163 # Decode a string using the gzip content encoding such as specified by the
1164 # Content-Encoding: gzip
1172 """gzip encoded data -> unencoded data
1174 Decode data using the gzip content encoding as described in RFC 1952
1176 if not gzip:
1179 gzf = gzip.GzipFile(mode="rb", fileobj=f)
1189 # Return a decoded file-like object for the gzip encoding
1195 class GzipDecodedResponse(gzip.GzipFile if gzip else object):
1196 """a file-like object to decode a response encoded with the gzip
1202 if not gzip:
1205 gzip.GzipFile.__init__(self, mode="rb", fileobj=self.stringio)
1208 gzip.GzipFile.close(self)
1238 #if true, we'll request gzip encoding
1241 # if positive, encode request using gzip if it exceeds this threshold
1390 if (self.accept_gzip_encoding and gzip):
1392 connection.putheader("Accept-Encoding", "gzip")
1434 gzip):
1435 connection.putheader("Content-Encoding", "gzip")
1452 if response.getheader("Content-Encoding", "") == "gzip":