Skip to main content

bit_width_for_range

Function bit_width_for_range 

Source
pub fn bit_width_for_range(min: i64, max: i64) -> u8
Expand description

Compute the minimum number of bits needed to represent the range of values.

Useful for external callers that want to estimate compression ratio.