MCPcopy Create free account
hub / github.com/EasyIME/PIME / decompress

Method decompress

python/python3/tornado/util.py:98–109  ·  view source on GitHub ↗

Decompress a chunk, returning newly-available data. Some data may be buffered for later processing; `flush` must be called when there is no more input data to ensure that all data was processed. If ``max_length`` is given, some input data may be left over in

(self, value: bytes, max_length: int = 0)

Source from the content-addressed store, hash-verified

96 self.decompressobj = zlib.decompressobj(16 + zlib.MAX_WBITS)
97
98 def decompress(self, value: bytes, max_length: int = 0) -> bytes:
99 """Decompress a chunk, returning newly-available data.
100
101 Some data may be buffered for later processing; `flush` must
102 be called when there is no more input data to ensure that
103 all data was processed.
104
105 If ``max_length`` is given, some input data may be left over
106 in ``unconsumed_tail``; you must retrieve this value and pass
107 it back to a future call to `decompress` if it is not empty.
108 """
109 return self.decompressobj.decompress(value, max_length)
110
111 @property
112 def unconsumed_tail(self) -> bytes:

Callers 1

data_receivedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected