You are on page 1of 5

Arithmetic coding and zip coding are both methods for data compression, but they work in

different ways.

Arithmetic coding is a lossless data compression technique that uses a probabilistic model of
the data to assign a real number to each possible data sequence. The shorter the codeword
for a sequence, the less likely the sequence is to occur. This means that arithmetic coding can
achieve very high compression ratios, especially for data that has a high degree of
redundancy.

Zip coding is a lossless data compression technique that uses a fixed-length code to represent
each symbol in the data. The code is designed to be as short as possible for the most common
symbols, and as long as possible for the least common symbols. This means that zip coding
can be very efficient for data that has a predictable distribution of symbols.
Krafft's inequality is a fundamental concept in information theory that deals with the
relationship between the lengths of codewords in a prefix-free code and the probabilities of the
symbols those codewords represent. It states that for any prefix-free code, the sum of the
probabilities of all codewords of a given length must be less than or equal to 1/2^(length-1).

Statement of Kraft's Inequality:

For a prefix-free code with codeword lengths l1, l2, ..., ln and corresponding symbol
probabilities p1, p2, ..., pn, the following inequality holds:

∑(pi * 2^(-li)) ≤ 1

You might also like