pub fn bits_required(max_index: usize) -> u8
Returns the minimum bit width needed to represent max_index.
max_index