Huffman Codes versus Augmented Non-Prefix-Free Codes

  • Boran Adaş
  • Ersin Bayraktar
  • M. Oğuzhan Külekci
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9125)


Non–prefix–free (NPF) codes are not uniquely decodable, and thus, have received very few attention due to the lack of that most essential feature required in any coding scheme. Augmenting NPF codes with compressed data structures has been proposed in ISIT’2013 [8] to overcome this limitation. It had been shown there that such an augmentation not only brings the unique decodability to NPF codes, but also provides efficient random access. In this study, we extend this approach and compare augmented NPF codes with the \(0\)th–order Huffman codes in terms of compression ratios and random access times. Basically, we benchmark four coding schemes as NPF codes augmented with wavelet trees (NPF–WT), with R/S dictionaries (NPF–RS), Huffman codes, and sampled Huffman codes. Since Huffman coding originally does not provide random access feature, sampling is a common way in practice to speed up access to arbitrary symbols in the encoded stream. We achieve sampling by simply managing an additional array that marks the beginnings of the codewords in steps of the sampling ratio, and keeping that sparse bit array compressed via R/S dictionary data structure. The experiments revealed that augmented NPF codes achieve compression very close to the Huffman with the additional advantage of random access. When compared to sampled Huffman coding both the compression ratios and random access performances of the NPF schemes are superior.


Compression Ratio Random Access Huffman Code Wavelet Tree Select Operation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Claude, F., Navarro, G.: Space efficient data structures. In: Tutorial Presented at International Symposium on String Processing and Information Retrieval (SPIRE), November 2012Google Scholar
  2. 2.
    Dalai, M., Leonardi, R.: Non prefix-free codes for constrained sequences. In: Proceedings of International Symposium on Information Theory (ISIT), pp. 1534–1538 (2005)Google Scholar
  3. 3.
    Fenwick, P.: Lossless Compression Handbook, chapter 3, pp. 55–78. Academic Press (2003)Google Scholar
  4. 4.
    Ferragina, P., González, R., Navarro, G., Venturini, R.: Compressed text indexes: From theory to practice. Journal of Experimental Algorithmics (JEA), 13:12 (2009)Google Scholar
  5. 5.
    Gog, S., Beller, T., Moffat, A., Petri, M.: From theory to practice: plug and play with succinct data structures. In: Gudmundsson, J., Katajainen, J. (eds.) SEA 2014. LNCS, vol. 8504, pp. 326–337. Springer, Heidelberg (2014) Google Scholar
  6. 6.
    Grossi, R., Gupta, A., Vitter, J.S: High-order entropy-compressed text indexes. In: Proceedings of the 14th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 841–850 (2003)Google Scholar
  7. 7.
    Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proceedings of the Institute of Radio Engineers 40(9), 1098–1101 (1952)Google Scholar
  8. 8.
    Kulekci, M.O.: Uniquely decodable and directly accessible non-prefix-free codes via wavelet trees. In: 2013 IEEE International Symposium on Information Theory Proceedings (ISIT), pp. 1969–1973, July 2013Google Scholar
  9. 9.
    Kulekci, M.O.: Enhanced variable-length codes: Improved compression with efficient random access. Data Compression Conference (DCC) 2014, 362–371 (2014)Google Scholar
  10. 10.
    Okanohara, D., Sadakane, K.: Practical entropy-compressed rank/select dictionary. In: ALENEX. SIAM (2007)Google Scholar
  11. 11.
    Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees and multisets. In: Proceedings of the 13th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 233–242 (2002)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Boran Adaş
    • 1
  • Ersin Bayraktar
    • 1
  • M. Oğuzhan Külekci
    • 2
  1. 1.Department of Computer Engineringİstanbul Technical UniversityIstanbulTurkey
  2. 2.ERLAB Software Co.ITU ARI TeknokentIstanbulTurkey

Personalised recommendations