| Communications Toolbox | ![]() |
Arithmetic coding offers a way to compress data and can be useful for data sources having a small alphabet. The length of an arithmetic code, instead of being fixed relative to the number of symbols being encoded, depends on the statistical frequency with which the source produces each symbol from its alphabet. For long sequences from sources having skewed distributions and small alphabets, arithmetic coding compresses better than Huffman coding.
The arithenco and arithdeco functions support arithmetic coding and decoding.
| Example: Creating and Decoding a Huffman Code | Representing Arithmetic Coding Parameters | ![]() |
© 1994-2005 The MathWorks, Inc.