MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / read_bits

Method read_bits

nodedb-codec/src/double_delta.rs:103–109  ·  view source on GitHub ↗
(&mut self, num_bits: usize)

Source from the content-addressed store, hash-verified

101 }
102
103 pub(crate) fn read_bits(&mut self, num_bits: usize) -> Result<u64, CodecError> {
104 let mut value = 0u64;
105 for _ in 0..num_bits {
106 value = (value << 1) | u64::from(self.read_bit()?);
107 }
108 Ok(value)
109 }
110}
111
112// ---------------------------------------------------------------------------

Callers 4

decode_dodFunction · 0.80
next_sampleMethod · 0.80
decode_timestampMethod · 0.80
decode_valueMethod · 0.80

Calls 1

read_bitMethod · 0.80

Tested by

no test coverage detected