MCPcopy Create free account
hub / github.com/dpkp/kafka-python / gzip_decode

Function gzip_decode

kafka/codec.py:94–103  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

92
93
94def gzip_decode(payload):
95 buf = io.BytesIO(payload)
96
97 # Gzip context manager introduced in python 2.7
98 # so old-fashioned way until we decide to not support 2.6
99 gzipper = gzip.GzipFile(fileobj=buf, mode='r')
100 try:
101 return gzipper.read()
102 finally:
103 gzipper.close()
104
105
106def snappy_encode(payload, xerial_compatible=True, xerial_blocksize=32*1024):

Callers 3

test_gzipFunction · 0.90
_decompressMethod · 0.90
_maybe_uncompressMethod · 0.90

Calls 2

readMethod · 0.80
closeMethod · 0.45

Tested by 1

test_gzipFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…