Main Page

encyclopedia.codeboy.net

 

Prefix code

A prefix code, also called a comma-free code, is a code consisting of strings so that for any given string in the code, there is no shorter string in the code that is an initial substring of that string. This means that when strings from the code are put together, you don't need any separators, since it's known when a string ends. Examples of where prefix codes are used are Huffman coding and Country calling codes.

"This isn't right, this isn't even wrong." - Wolfgang Pauli (1900-1958), upon reading a young physicist's paper