TD 3, Arithmetic coding

Introduction to Information Theory

January 20 2023


Let I={0,…,n−1} (typically n=256) be a memoryless source. For all i in I the probabilities are given by Pr(i)=pi/M where pi is a positive integer and M an integer (generally a power of $2$, equal to 65536 here). We denote by si the sum Σj<i pj.

Outline of the encoding Reduction of the interval [a,b[ while one of these conditions is met For a stream (i1,…,iL) the output is the truncated binary representation of S(x1,…,xn).
  1. The class Source.java contains the definitions of the constants and the probability distributions and some useful methods.
  2. Implement the arithmetic encoder. You can use the following implementation of the decoder to check your implementation. To use the decoder, run java Decoder fichier.code where fichier.code is your encoded file.
  3. You can use the unix commands
    java Coder candide.txt > candide.code
    java Decoder candide.code > candide.decode
    diff candide.txt candide.decode
    
Ressources:

This document was translated from LATEX by HEVEA