Range Encoding - How Range Encoding Works

How Range Encoding Works

Range encoding conceptually encodes all the symbols of the message into one number, unlike Huffman coding which assigns each symbol a bit-pattern and concatenates all the bit-patterns together. Thus range encoding can achieve greater compression ratios than the one-bit-per-symbol lower bound on Huffman encoding and it does not suffer the inefficiencies that Huffman does when dealing with probabilities that are not exact powers of two.

The central concept behind range encoding is this: given a large-enough range of integers, and a probability estimation for the symbols, the initial range can easily be divided into sub-ranges whose sizes are proportional to the probability of the symbol they represent. Each symbol of the message can then be encoded in turn, by reducing the current range down to just that sub-range which corresponds to the next symbol to be encoded. The decoder must have the same probability estimation the encoder used, which can either be sent in advance, derived from already transferred data or be part of the compressor and decompressor.

When all symbols have been encoded, merely identifying the sub-range is enough to communicate the entire message (presuming of course that the decoder is somehow notified when it has extracted the entire message). A single integer is actually sufficient to identify the sub-range, and it may not even be necessary to transmit the entire integer; if there is a sequence of digits such that every integer beginning with that prefix falls within the sub-range, then the prefix alone is all that's needed to identify the sub-range and thus transmit the message.

Read more about this topic:  Range Encoding

Famous quotes containing the words range and/or works:

    During the cattle drives, Texas cowboy music came into national significance. Its practical purpose is well known—it was used primarily to keep the herds quiet at night, for often a ballad sung loudly and continuously enough might prevent a stampede. However, the cowboy also sang because he liked to sing.... In this music of the range and trail is “the grayness of the prairies, the mournful minor note of a Texas norther, and a rhythm that fits the gait of the cowboy’s pony.”
    —Administration in the State of Texa, U.S. public relief program (1935-1943)

    Artists, whatever their medium, make selections from the abounding materials of life, and organize these selections into works that are under the control of the artist.... In relation to the inclusiveness and literally endless intricacy of life, art is arbitrary, symbolic and abstracted. That is its value and the source of its own kind of order and coherence.
    Jane Jacobs (b. 1916)