Skip to main content

read_chunk

Function read_chunk 

Source
unsafe fn read_chunk(buffer: &[u8], bit_offset: usize, index: usize) -> u64
Expand description

Reads the indexth complete 64-bit chunk of buffer, whose bits start at bit_offset (in 0..8)

ยงSafety

index must be less than the number of complete chunks, so that the buffer holds at least index * 8 + 8 bytes, plus one more byte when bit_offset != 0 (the remainder byte the constructor guarantees)