Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含 10000 行的数字向量,大部分值为零。在这种情况下,Arithmetic 和 Huffman 之间的无损压缩算法应该选择哪一种呢?提前致谢!
算术和霍夫曼的实现是什么?您是否允许将向量视为比特流并选择字长,或者您是否压缩向量中的实际值。聪明的钱通常是用算术编码来压缩,用霍夫曼来提高性能,但细节是魔鬼。
如果向量是真正稀疏的,RLE 将以很少的开销为您提供接近最佳的结果:
值,零到下一个值的数量,值,零到下一个值的数量