bit_offset

Function bit_offset 

Source
pub fn bit_offset(index: usize, offset: usize) -> usize
Expand description

Combines an index in an array of u64 and an offset within the integer into a bit offset.

§Arguments

  • index: Array index.
  • offset: Offset within the integer.

§Examples

use simple_sds_sbwt::bits;

assert_eq!(bits::bit_offset(1, 59), 123);

§Panics

May panic if the result would be greater than usize::MAX.