TOPICS
Search

Prefix-Free Code


A prefix-free code is a code in which no codeword is a proper prefix of another codeword. Consequently, a concatenation of codewords can be decoded from left to right without a separator or lookahead. If the codeword lengths are l_1,l_2,..., they satisfy the Kraft inequality

 sum_(i)2^(-l_i)<=1,

for a binary code, and every sequence of positive integer lengths satisfying this inequality is realized by a binary prefix-free code.


See also

Code, Codeword, Kraft Inequality

Explore with Wolfram|Alpha

References

Cover, T. M. and Thomas, J. A. Elements of Information Theory, 2nd ed. Hoboken, NJ: Wiley, 2006.

Cite this as:

Weisstein, Eric W. "Prefix-Free Code." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/Prefix-FreeCode.html

Subject classifications