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

Method compress

python/python3/tornado/websocket.py:749–753  ·  view source on GitHub ↗
(self, data: bytes)

Source from the content-addressed store, hash-verified

747 )
748
749 def compress(self, data: bytes) -> bytes:
750 compressor = self._compressor or self._create_compressor()
751 data = compressor.compress(data) + compressor.flush(zlib.Z_SYNC_FLUSH)
752 assert data.endswith(b"\x00\x00\xff\xff")
753 return data[:-4]
754
755
756class _PerMessageDeflateDecompressor(object):

Callers

nothing calls this directly

Calls 3

_create_compressorMethod · 0.95
compressMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected