Function ADS::encodeRice

Function Documentation

inline void ADS::encodeRice(BitWriter &w, std::uint64_t x, int k)

R_k( x ), U( q + 1 ) and the remainder r in k bits, x - 1 = q 2^k + r.

Pre:

x >= 1 and 0 <= k < 64

Post:

riceLength( x , k ) bits written