This project is a simple implementation of an exponential golomb coder which conserves space for lower values at the expense of higher values. Thus, these codes are useful for functions with higher probabilities of low valued outputs. The smallest input symbol, 0, results in a single bit of output, but larger values may require up to 32 bits of storage space.

This coder is used within my Cairo codec as part of the backend binarization phase.



Downloads

  ExpGolomb Coder Source Code



More Information

For more information, check out this blog post.