Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
zlib python错误:解压数据时出错-3:头检查不正确_Python_Python 2.7 - Fatal编程技术网

zlib python错误:解压数据时出错-3:头检查不正确

zlib python错误:解压数据时出错-3:头检查不正确,python,python-2.7,Python,Python 2.7,问题的实质是,mysql数据库使用zlib数据进行压缩。 当打开压缩机器的包装时,它们都正常。 在另一台机器上 zlib.error: Error -3 while decompressing data: incorrect header check 压缩: fmt = '%df' % (num_of_p,) dist = buffer(zlib.compress( struct.pack(fmt, *data), 9 )) 拆包: dist = struct.unpack ( '% df'

问题的实质是,mysql数据库使用zlib数据进行压缩。 当打开压缩机器的包装时,它们都正常。 在另一台机器上

zlib.error: Error -3 while decompressing data: incorrect header check
压缩:

fmt = '%df' % (num_of_p,)
dist = buffer(zlib.compress( struct.pack(fmt, *data), 9 ))
拆包:

dist = struct.unpack ( '% df'% (num_of_p - 1,), zlib.decompress (data))
在打包python 2.7.3的机器上 在未打包的python 2.7.13复制了