What is Prefix code?
A code in which no codeword is the beginning of another codeword. For example, {0, 10, 110, 111} is a prefix code: reading the received bit string from the start and cutting as soon as a codeword matches decodes it in only one way without waiting for later bits. For this reason it is also called an instantaneous code. If a set of code lengths satisfies the Kraft inequality, a prefix code with those lengths can be built. Huffman codes are prefix codes. Some codes that are not prefix codes, such as {0, 01, 11}, can still be decoded in only one way, but decoding them requires looking ahead at later bits.
Japanese name: 接頭符号
Prefix code appears in 5 practice questions across 1 topic, including Information Theory and Coding Basics.