Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 593 Bytes

README.md

File metadata and controls

7 lines (6 loc) · 593 Bytes

Golomb-coding

The Golomb coding is a form of parameterized coding in which integers to be coded are stored as values relative to a constant b. A positive integer x is represented in two parts:

  1. The first part is a unary representation of q+1, where q is the quotient floor(x/b)
  2. The second part is a special binary representation of the remainder r = x-qb. Note that there are b possible remainders. For example, if b = 3, the possible remainders will be 0, 1 & 2.