Smallwikipedialogo.png Wikipedia has an article related to:

A prefix code is a code where no two code words start with another code word.

For example, the code with the code words {01, 00, 10, 111} is a prefix code, while the code with the code words {01, 11, 110, 10} is not, since 110 starts with 11.

Using prefix codes, a message can be transmitted as a sequence of concatenated code words, without any out-of-band markers to frame the words in the message. The recipient can decode the message unambiguously, by repeatedly finding and removing prefixes that form valid code words.


Examples of prefix codes include: