Source-coding definitions
A code is a function ?: X ? B+
- B = {0, 1}
- B+ ? the set of finite strings over B
- B+ = {0, 1, 00, 01, 10, 11, 000, 001, …}
- ?(x) = ?(x1) ?(x2) ?(x3) … ?(xN)
A code is uniquely decodable (UD) iff
A code is instantaneous iff
- No codeword is the prefix of another
- ?(x1) is not a prefix of ?(x2)