Data Compression


Criteria

Survey Formats

Basics

Compression Methods

Data Formats


Arithmetic Coding (AC)

Principle of the AC

General Algorithm

Encoding

Decoding

Calculation of Intervals

Division

Rounding Errors

Shifting of Intervals

AC versus Huffman

Data with high Redundancy

Adaptive AC

Implementations


Glossary

Index


Download


www.BinaryEssence.com

Division of the Intervals


The calculation of the sub-intervals is processed according to the following rules:


  • The entire, current interval Jcurr is defined by its size, the lower and the upper endpoint:
    Jcurrs, Jcurrl, Jcurru
  • The sub-interval of the first symbol (0) of the alphabet starts with a closed lower endpoint at the beginning of the current interval:
    Jl(0) = Jcurrl
  • The open upper endpoint of the first sub-interval results from the probability of the first symbol p(0) and the size of the current interval:
    Ju(0) = Jl(0) + Jcurrs * p(0)
  • The closed upper endpoint of each sub-interval is equal to the closed lower endpoint of sub-interval immediately following:
    Ju(x) = Jl(x+1)
  • For all further sub-interval applies:
    J(x) = [ Ju(x-1); Ju(x-1) + Jgess * p(x) )
  • The sub-interval of the last symbol of the alphabet J(max) ends at the open upper endpoint of the current interval:
    Ju(z) = Jcurru

Example "abcd":



 <   ^   > 

Calculation of the Intervals Calculation of the Intervals Rounding Errors at the Interval Dividing