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

Method Decode

libs/coding/elias_coder.hpp:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62 template <typename TReader>
63 static uint64_t Decode(BitReader<TReader> & reader)
64 {
65 uint8_t n = GammaCoder::Decode(reader);
66
67 ASSERT_GREATER(n, 0, ());
68 --n;
69
70 ASSERT_LESS_OR_EQUAL(n, 63, ());
71
72 uint64_t const msb = static_cast<uint64_t>(1) << n;
73 return msb | reader.ReadAtMost64Bits(n);
74 }
75};
76} // namespace coding

Callers

nothing calls this directly

Calls 2

ReadAtMost64BitsMethod · 0.80
DecodeFunction · 0.70

Tested by

no test coverage detected