Skip to main content

read_varint_word

Function read_varint_word 

Source
fn read_varint_word(data: &mut &[u8], len: usize) -> u64
Expand description

Read the len payload bytes of a variable-length integer, returning them in the low len * 8 bits of a word. Bits above that are zero or belong to whatever follows in the row, so a caller must mask them off.

Loading a fixed eight bytes is what keeps len out of the load, and so off a branch. Those bytes exist except at the very end of the buffer.