Fast and Compact Prefix Codes

  • Authors:
  • Travis Gagie;Gonzalo Navarro;Yakov Nekrich

  • Affiliations:
  • Research Group in Genome Informatics, Bielefeld University, and Department of Computer Science, University of Chile,;Department of Computer Science, University of Chile,;Department of Computer Science, University of Bonn,

  • Venue:
  • SOFSEM '10 Proceedings of the 36th Conference on Current Trends in Theory and Practice of Computer Science
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is well-known that, given a probability distribution over n characters, in the worst case it takes 驴(n logn) bits to store a prefix code with minimum expected codeword length. However, in this paper we first show that, for any 驴 with 0 驴驴 = O(polylog(n)), it takes O(n loglog(1 / 驴)) bits to store a prefix code with expected codeword length within an additive 驴 of the minimum. We then show that, for any constant c 1, it takes O(n 1 / c logn) bits to store a prefix code with expected codeword length at most c times the minimum. In both cases, our data structures allow us to encode and decode any character in O(1) time.