在哪里可以找到产生无标头输出的无损压缩算法?

发布于 2024-07-13 18:47:20 字数 117 浏览 8 评论 0 原文

你们中有人知道产生无标头输出的无损压缩算法吗? 例如不存储用于压缩的哈夫曼树吗? 我不是谈论硬编码的霍夫曼树,但我想知道是否有任何算法可以压缩和解压缩输入而不在其输出中存储一些元数据。 或者这在理论上是不可能的吗?

Does anyone of you know a lossless compression algorithm, which produces headerless outputs?
For example do not store the huffman tree used to compress it? I do not speak about hard coded huffman trees, but I like to know if there is any algorithm that can compress and decompress input without storing some metadata in its output. Or is this even theoretically impossible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

长亭外,古道边 2024-07-20 18:47:20

当然是可能的。 其中,LZ 系列压缩器不需要输出除压缩数据本身之外的任何内容,因为字典是随着压缩(或解压缩)进度而在线构建的。 对于那些 LZ 类型的算法,您有很多参考实现。 例如,LZMA,7zip 的组件。

Of course it is posible. Among others, the LZ family of compressors don't need to output anything apart from the compressed data itself, as the dictionary is built on-line as compression (or decompression) progress. You have a lot of reference implementations for those LZ-type algorithms. For example, LZMA, component of 7zip.

放我走吧 2024-07-20 18:47:20

自适应霍夫曼编码正是这样做的。 更一般地说,术语自适应编码用于描述具有此属性的熵代码。 一些字典代码也具有此属性,例如游程编码 (RLE)Lempel-Ziv-Welch (LZW)

Adaptive Huffman coding does exactly that. More generally, the term adaptive coding is used to describe entropy codes with this property. Some dictionary codes have this property too, e.g. run-length encoding (RLE) and Lempel-Ziv-Welch (LZW).

意中人 2024-07-20 18:47:20

运行长度编码就是一个例子

Run Length Encoding would be one example

陌生 2024-07-20 18:47:20

lzo 浮现在脑海中。 它在OpenVPN中使用,效果很好

lzo springs to mind. it's used in OpenVPN, with great results

梦屿孤独相伴 2024-07-20 18:47:20

您为什么要寻找具有无标头压缩输出的压缩算法?

也许 (a) 您有一个像双向电话这样的系统,需要低延迟流压缩/解压缩。
Zach Scrivena提到的压缩算法的自适应编码类别
以及 Diego Sevilla 和 Javier 提到的 LZ 系列字典压缩算法
非常适合此类应用。
这些算法的实际实现通常确实有一个或两个字节的元数据
在开始时(使它们对(b)应用程序无用),但这对延迟影响很小或没有影响。

也许 (b) 您主要对密码学感兴趣,并且您听说加密前压缩可以提供一些改进的安全属性,只要压缩文本没有固定的元数据标头“crib”。
现代加密算法(据我们所知)不容易受到此类“婴儿床”的影响,但如果您偏执,您可能会感兴趣
“双射压缩”(ab, c等)。
当接收器获得此类压缩输出时,不可能检测到传输中的错误(翻转位、插入位、删除位等)(使得这些算法对于(a)应用程序不是特别有用)。

也许 (c) 您出于某种其他原因对无标头压缩感兴趣。 听起来很有趣——那是什么原因呢?

Why are you looking for compression algorithms with headerless compressed output?

Perhaps (a) you have a system like 2-way telephony that needs low-latency streaming compression/decompression.
The adaptive coding category of compression algorithms mentioned by Zach Scrivena
and the LZ family of dictionary compression algorithms mentioned by Diego Sevilla and Javier
are excellent for this kind of application.
Practical implementations of these algorithms usually do have a byte or two of metadata
at the beginning (making them useless for (b) applications), but that has little or no effect on latency.

Perhaps (b) you are mainly interested in cryptography, and you hear that compress-before-encrypt gives some improved security properties, as long as the compressed text does not have fixed metadata header "crib".
Modern encryption algorithms aren't (as far as we know) vulnerable to such "cribs", but if you're paranoid you might be interested in
"bijective compression" (a, b, c, etc.).
It's not possible to detect errors in transmission (flipped bits, inserted bits, deleted bits, etc.) when a receiver gets such compressed output (making these algorithms not especially useful for (a) applications).

Perhaps (c) you are interested in headerless compression for some other reason. Sounds fascinating -- what is that reason?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文