Huffman encoding has been an enduring technique for 70+ years, ubiquitous in compression algorithms since its invention. In this paper we propose a new approach to Huffman coding, based on a data structure from wavelet trees. The resulting pivot-coded Huffman (PivCo-Huffman) enables high-performance SIMD-friendly encoding and decoding operations. In our tests PivCo-Huffman consistently outperforms state-of-the-art Huffman codecs in decoding throughput. Additionally, we show how ANS-coding can be selectively applied to skewed nodes in this structure, yielding compression ratios approaching those of ANS-based codecs while preserving very high decompression speeds.
翻译:哈夫曼编码作为一项经久不衰的技术已存在70余年,自其诞生以来便在压缩算法中无处不在。本文提出一种基于小波树数据结构的新型哈夫曼编码方法。由此产生的枢轴编码哈夫曼(PivCo-Huffman)可实现高性能的SIMD友好编解码操作。在我们的测试中,PivCo-Huffman在解码吞吐量上始终优于最先进的哈夫曼编解码器。此外,我们还展示了如何将ANS编码有选择性地应用于该结构中的偏斜节点,从而在保持极高解压缩速度的同时,获得接近基于ANS的编解码器的压缩比。