MCPcopy Index your code
hub / github.com/python/cpython / encode

Method encode

Lib/encodings/zlib_codec.py:33–38  ·  view source on GitHub ↗
(self, input, final=False)

Source from the content-addressed store, hash-verified

31 self.compressobj = zlib.compressobj()
32
33 def encode(self, input, final=False):
34 if final:
35 c = self.compressobj.compress(input)
36 return c + self.compressobj.flush()
37 else:
38 return self.compressobj.compress(input)
39
40 def reset(self):
41 self.compressobj = zlib.compressobj()

Callers

nothing calls this directly

Calls 2

compressMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected