2023-07-06 02:39:57 +08:00

10 lines
180 B
Python

import _zlib
def compress(data: bytes, level: int = 1) -> bytes:
return _zlib.compress(data, level)
def decompress(data: bytes) -> bytes:
return _zlib.decompress(data)