答案1
首先尝试创建“压缩机”的实例:
import zstandard
compressor = zstandard.ZstdCompressor()
input_data = b'11111'
compressed_data = compressor.compress(input_data)
Out[25]: b'(\xb5/\xfd \x05)\x00\x0011111'
https://python-zstandard.readthedocs.io/en/latest/compressor.html
减压方法也是如此......