MCPcopy Create free account
hub / github.com/comaps/comaps / ReadAtMost64Bits

Method ReadAtMost64Bits

libs/coding/bit_streams.hpp:193–208  ·  view source on GitHub ↗

Same as Read but accept up to 64 bits to read.

Source from the content-addressed store, hash-verified

191
192 // Same as Read but accept up to 64 bits to read.
193 uint64_t ReadAtMost64Bits(uint8_t n)
194 {
195 ASSERT_LESS_OR_EQUAL(n, 64, ());
196
197 uint64_t result = 0;
198
199 READ_BYTE(0);
200 READ_BYTE(1);
201 READ_BYTE(2);
202 READ_BYTE(3);
203 READ_BYTE(4);
204 READ_BYTE(5);
205 READ_BYTE(6);
206
207 return result | (static_cast<uint64_t>(Read(n)) << (7 * kMinBits));
208 }
209
210#undef READ_BYTE
211

Callers 4

DecodeMethod · 0.80
DecodeMethod · 0.80
UNIT_TESTFunction · 0.80
ReadCrossMwmIdMethod · 0.80

Calls 1

ReadFunction · 0.70

Tested by 1

UNIT_TESTFunction · 0.64