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