| 14 | public: |
| 15 | template <typename TWriter> |
| 16 | static bool Encode(BitWriter<TWriter> & writer, uint64_t value) |
| 17 | { |
| 18 | if (value == 0) |
| 19 | return false; |
| 20 | |
| 21 | uint8_t const n = bits::FloorLog(value); |
| 22 | ASSERT_LESS_OR_EQUAL(n, 63, ()); |
| 23 | |
| 24 | uint64_t const msb = static_cast<uint64_t>(1) << n; |
| 25 | writer.WriteAtMost64Bits(msb, n + 1); |
| 26 | writer.WriteAtMost64Bits(value, n); |
| 27 | return true; |
| 28 | } |
| 29 | |
| 30 | template <typename TReader> |
| 31 | static uint64_t Decode(BitReader<TReader> & reader) |
nothing calls this directly
no test coverage detected