简体   繁体   English

是否有任何好的类似 DEFLATE 的压缩算法是可加的和不可变的?

[英]Are there any good DEFLATE-like compression algorithms that are additive and immutable?

I need to add more things onto a stacklike structure, but compress them additively such that addition of new data results in the expected compression gain, but new chunks are still stored as compressed data without altering any of the past data chunks.我需要将更多的东西添加到类似堆栈的结构中,但要对它们进行加法压缩,以便添加新数据会产生预期的压缩增益,但新块仍会存储为压缩数据,而不会改变任何过去的数据块。

So in other words, it must preserve the additive property over successive compressed chunks.因此换句话说,它必须在连续的压缩块上保留附加属性。 If f() is the 'adding another chunk' function, I need the following to hold for all chunks 'x':如果 f() 是“添加另一个块”function,我需要以下内容来保存所有块“x”:

\sum_{i=1}^{n}f(x_i)=f(\sum_{i=1}^{n}x_i)

Sure.当然。 Deflate does this, if you just keep it running and terminate each chunk at a byte boundary, eg with Z_SYNC_FLUSH, so that it can be written to file up to and including that chunk. Deflate 会这样做,如果你只是让它运行并在字节边界处终止每个块,例如使用 Z_SYNC_FLUSH,以便它可以写入文件直到并包括该块。

So long as your chunks are large enough, you will get the same compression gain.只要您的块足够大,您就会获得相同的压缩增益。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM