Arithmetic Coding with Folds and Unfolds

  • Richard Bird
  • Jeremy Gibbons
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2638)


Arithmetic coding is a method for data compression. Although the idea was developed in the 1970’s, it wasn’t until the publication of an “accessible implementation” that it achieved the popularity it has today. Over the past ten years arithmetic coding has been refined and its advantages and disadvantages over rival compression schemes, particularly Huffman and Shannon-Fano coding, have been elucidated. Arithmetic coding produces a theoretically optimal compression under much weaker assumptions than Huffman and Shannon-Fano, and can compress within one bit of the limit imposed by Shannon’s Noiseless Coding Theorem. Additionally, arithmetic coding is well suited to adaptive coding schemes, both character and word based. For recent perspectives on the subject.


Arithmetic Code Current Interval Optimal Compression Int1 Int2 Binary Fraction 
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.
    Haskell 98: A Non-Strict, Purely Functional Language. Available online at
  2. 2.
    Standard Libraries for Haskell 98. Available online at
  3. 3.
    Bird, R.S.: Introduction to Functional Programming using Haskell. International Series in Computer Science. Prentice Hall, Englewood Cliffs (1998)Google Scholar
  4. 4.
    Bird, R.S., de Moor, O.: Algebra of Programming. International Series in Computer Science. Prentice Hall, Englewood Cliffs (1997)zbMATHGoogle Scholar
  5. 5.
    Fano, R.M.: Transmission of Information. MIT Press, Cambridge. Wiley, New York (1961)Google Scholar
  6. 6.
    Gibbons, J.: Origami programming. In: Gibbons, J., de Moor, O. (eds.) The Fun of Programming, Palgrave (2003)Google Scholar
  7. 7.
    Gibbons, J.: The Third Homomorphism Theorem. J. Functional Prog. 6(4), 657–665 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Howard, P.G., Vitter, J.S.: Arithmetic coding for data compression. Proc. IEEE 82(6), 857–865 (1994)CrossRefGoogle Scholar
  9. 9.
    Huffman, D.A.: A method for the construction of minimum-redundancy codes. Proc. Inst. Radio Eng. 40(9), 1098–1101 (1952)Google Scholar
  10. 10.
    Jiang, J.: Novel design of arithmetic coding for data compression. IEE Proc. Comput. Dig. Tech. 142(6), 419–424 (1995)CrossRefGoogle Scholar
  11. 11.
    Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 124–144. Springer, Heidelberg (1991)Google Scholar
  12. 12.
    Moffat, A., Neal, R.M., Witten, I.H.: Arithmetic coding revisited. ACM Trans. on Inf. Systems 16(3), 256–294 (1998)CrossRefGoogle Scholar
  13. 13.
    Shannon, C.E.: A mathematical theory of communication. Bell Syst. Tech. J. 27, 79–423 (1948)MathSciNetGoogle Scholar
  14. 14.
    Witten, I.H., Neal, R.M., Cleary, J.G.: Arithmetic coding for data compression. C. ACM 30(6), 520–540 (1987)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Richard Bird
    • 1
  • Jeremy Gibbons
    • 1
  1. 1.Programming Research GroupOxford UniversityOxfordUK

Personalised recommendations