prefix code

A prefix code is a type of code in which no code word is a prefix of any other code word.

Prefix codes are useful because a prefix-encoded string can be 1. smaller than its source string and 2. decoded unambiguously in time. As a result, prefix codes are ubiquitous in compression schemes.

Author: Nicholas Coltharp

Created: 2026-04-29 Wed 00:01

Validate