Universal Code (data Compression)

Universal Code (data Compression)

In data compression, a universal code for integers is a prefix code that maps the positive integers onto binary codewords, with the additional property that whatever the true probability distribution on integers, as long as the distribution is monotonic (i.e., p(i) ≥ p(i + 1) for all positive i), the expected lengths of the codewords are within a constant factor of the expected lengths that the optimal code for that probability distribution would have assigned. A universal code is asymptotically optimal if the ratio between actual and optimal expected lengths is bounded by a function of the information entropy of the code that, in addition to being bounded, approaches 1 as entropy approaches infinity.

In general, most prefix codes for integers assign longer codewords to larger integers. Such a code can be used to efficiently communicate a message drawn from a set of possible messages, by simply ordering the set of messages by decreasing probability and then sending the index of the intended message. Universal codes are generally not used for precisely known probability distributions, and no universal code is known to be optimal for any distribution used in practice.

A universal code should not be confused with universal source coding, in which the data compression method need not be a fixed prefix code and the ratio between actual and optimal expected lengths must approach one. However, note that an asymptotically optimal universal code can be used on independent identically-distributed sources, by using increasingly large blocks, as a method of universal source coding.

Read more about Universal Code (data Compression):  Universal and Non-universal Codes, Relationship To Practical Compression

Famous quotes containing the words universal and/or code:

    It is long ere we discover how rich we are. Our history, we are sure, is quite tame: we have nothing to write, nothing to infer. But our wiser years still run back to the despised recollections of childhood, and always we are fishing up some wonderful article out of that pond; until, by and by, we begin to suspect that the biography of the one foolish person we know is, in reality, nothing less than the miniature paraphrase of the hundred volumes of the Universal History.
    Ralph Waldo Emerson (1803–1882)

    Faultless honesty is a sine qua non of business life. Not alone the honesty according to the moral code and the Bible. When I speak of honesty I refer to the small, hidden, evasive meannesses of our natures. I speak of the honesty of ourselves to ourselves.
    Alice Foote MacDougall (1867–1945)