Deflate64的最大压缩比是多少?

What is the maximum compresion ratio of Deflate64?

我想知道最大值是多少。 Deflate64 的压缩比是.

常规deflate规格压缩率最高1032:1。

zlib 网站上给出了“1032:1”图的来源,它被告知:

The limit comes from the fact that one length/distance pair can represent at most 258 output bytes. A length requires at least one bit and a distance requires at least one bit, so two bits in can give 258 bytes out, or eight bits in give 1032 bytes out. A dynamic block has no length restriction, so you could get arbitrarily close to the limit of 1032:1.

由于 Deflate64 支持最大 65.538 的长度,因此比率应该高得多。 当我简单地将上面引文中的 258 字节替换为 65.538 并将其乘以 4 以获得 262152:1 的比率时,我是否正确?

提前致谢。

没有。 (3 + 65535) * 8 / (16 + 1) = 524304 / 17 ~= 30841.4 : 1.

最后一个长度码的基值为3,额外的位数为15,所以一次匹配的最大长度为3 + 65535。你可以得到那么多的字节,或者是输入的八倍位,对于每个 length/distance 代码对。 524304 位。长度码的最小长度为 1,因此加上额外的位,最大长度可以用 16 位表示。其后是距离为 1 的距离代码,其最小大小为 1 位。所以我们有 17 位的压缩数据来产生 524304 位的未压缩数据。