根据RFC 1950,“OK”0x789C和“bad”0x78DA之间的区别在FLEVEL位字段中:FLEVEL (Compression level)
These flags are available for use by specific compression
methods. The "deflate" method (CM = 8) sets these flags as
follows:
0 - compressor used fastest algorithm
1 - compressor used fast algorithm
2 - compressor used default algorithm
3 - compressor used maximum compression, slowest algorithm
The information in FLEVEL is not needed for decompression; it
is there to indicate if recompression might be worthwhile.
“好”用2,“坏”用3。所以这种差异本身并不是问题。
为了进一步了解,您可以考虑为每个压缩和(尝试)解压缩提供以下信息:哪个平台、哪个版本的Python、哪个版本的zlib库、用于调用zlib模块的实际代码是什么。还提供失败解压缩尝试的完整回溯和错误消息。你试过用其他zlib读取软件解压失败的文件吗?结果如何?请澄清你必须处理的问题:“我被冲洗了吗?”意思是你不能访问原始数据?它是如何从流到文件的?你有什么保证数据在传输过程中没有损坏?
更新基于在您的自答中发布的部分澄清的一些观察结果:
你在用窗