MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / compress

Method compress

pymongo/compression_support.py:157–163  ·  view source on GitHub ↗
(data: bytes)

Source from the content-addressed store, hash-verified

155
156 @staticmethod
157 def compress(data: bytes) -> bytes:
158 if sys.version_info >= (3, 14):
159 from compression import zstd
160 else:
161 from backports import zstd
162
163 return zstd.compress(data)
164
165
166def decompress(data: bytes | memoryview, compressor_id: int) -> bytes:

Callers

nothing calls this directly

Calls 1

compressMethod · 0.45

Tested by

no test coverage detected