Golomb Coding - Use For Run-length Encoding

Use For Run-length Encoding

Given an alphabet of two symbols, or a set of two events, P and Q, with probabilities p and (1 − p) respectively, where p ≥ 1/2, Golomb coding can be used to encode runs of zero or more P's separated by single Q's. In this application, the best setting of the parameter M is the nearest integer to . When p = 1/2, M = 1, and the Golomb code corresponds to unary (n ≥ 0 P's followed by a Q is encoded as n ones followed by a zero).

Read more about this topic:  Golomb Coding