Golomb-Rice coding, as specified in BIP 158, involves operations on
individual bits. These classes will be used to implement the
encoding/decoding operations.
For BIP158; is cherry-picked from two commits (fe943f9 and 9b622dc) from:
https://github.com/bitcoin/bitcoin/pull/12254/commits
Depends on D2797.