1
/// Returns the number of bits needed to represent the given value.
2
17591784
pub fn bits_for_value(value: usize) -> u8 {
3
17591784
    value.ilog2() as u8 + 1
4
17591784
}