CalcWorldHub
Free online calculator · no signup

Golomb Rice code bit budget calculator

Budget unary quotient plus fixed remainder bits for a sequence under a chosen Rice parameter.

4,000 tools
Golomb Rice code bit budget calculator — Nonnegative integer values, Rice remainder bit count k and calculation method
Golomb Rice code bit budget calculator: inputs and calculation method.

How to use this calculator

Budget unary quotient plus fixed remainder bits for a sequence under a chosen Rice parameter.

  1. Enter Nonnegative integer values, Rice remainder bit count k. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Golomb Rice code bit budget explained

Rice coding assigns each nonnegative integer a unary quotient and a fixed-width remainder; the total is the sum of those code lengths.

Rice payload length13bits
Rice payload length: 13 bits in the worked scenario.

A numerical walkthrough

Nonnegative integer values = 0, 1, 2, 7; Rice remainder bit count k = 2.

  • Rice payload length: 13 bits

For k = 2, the four values use 3, 3, 3 and 4 bits respectively, for a 13-bit payload before framing.

The model behind the numbers

h.sum(a.map(x=>Math.floor(x/2**k)+1+k))

Unsigned integers and no framing; this does not choose an optimal parameter automatically..

What to enter

a — Nonnegative integer values
Nonnegative integer values. Use comma-separated values in the stated order.
k — Rice remainder bit count k
Rice remainder bit count k. Enter a whole number.

Interpreting the result

Unsigned integers and no framing; this does not choose an optimal parameter automatically.

Frequently asked questions

How is each length obtained?

floor(value/2ᵏ)+1+k bits.

Are signed values supported directly?

Map them to unsigned values first.

Is a larger k always better?

No, it trades quotient length against fixed remainder width.

How do I use the Golomb Rice code bit budget calculator?

Enter Nonnegative integer values, Rice remainder bit count k. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Golomb Rice code bit budget?

Nonnegative integer values = 0, 1, 2, 7; Rice remainder bit count k = 2. Rice payload length: 13 bits For k = 2, the four values use 3, 3, 3 and 4 bits respectively, for a 13-bit payload before framing.