LZ4解压使用python
LZ4 decompression using python
我使用 lz4 java 库 (https://github.com/lz4/lz4-java) and want to decompress it in python using lz4 library(https://pypi.org/project/lz4/) 压缩了数据。压缩后的数据在redis集群中可用。当我执行以下代码时:
from rediscluster import StrictRedisCluster
startup_nodes = [{"host": "my_host", "port": "7002"}]
rc = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=False)
result=rc.hget("key","field")
from lz4.frame import compress, decompress
decompress(result)
我收到错误:LZ4F_getFrameInfo 失败,代码:ERROR_frameType_unknown
我做错了什么?
“
得到解决方案。如果您遇到同样的问题,您可以看到以下link:
我使用 lz4 java 库 (https://github.com/lz4/lz4-java) and want to decompress it in python using lz4 library(https://pypi.org/project/lz4/) 压缩了数据。压缩后的数据在redis集群中可用。当我执行以下代码时:
from rediscluster import StrictRedisCluster
startup_nodes = [{"host": "my_host", "port": "7002"}]
rc = StrictRedisCluster(startup_nodes=startup_nodes, decode_responses=False)
result=rc.hget("key","field")
from lz4.frame import compress, decompress
decompress(result)
我收到错误:LZ4F_getFrameInfo 失败,代码:ERROR_frameType_unknown
我做错了什么? “
得到解决方案。如果您遇到同样的问题,您可以看到以下link: