Arithmetic Decoding Algorithm
P(a1), P(a2), … , P(am)
C(ai) = P(a1) + P(a2) + … + P(ai-1)
Decode b1b2...bm, number of symbols is n.
Initialize l := 0 and r := 1;
t := .b1b2...bm000...
for i = 1 to n do
w := r - l;
find j such that l + wC(aj) < t < l + w(C(aj)+P(aj))
output aj;
l := l + wC(aj);
r := l + wP(aj);
Previous slide
Next slide
Back to first slide
View graphic version