| 131 | } |
| 132 | |
| 133 | uint64_t LoadPartialWord(int8_t bit_offset, int64_t num_bits) { |
| 134 | uint64_t word = 0; |
| 135 | const int64_t num_bytes = bit_util::BytesForBits(num_bits); |
| 136 | memcpy(&word, bitmap_, num_bytes); |
| 137 | bitmap_ += num_bytes; |
| 138 | return (bit_util::ToLittleEndian(word) >> bit_offset) & |
| 139 | bit_util::LeastSignificantBitMask<uint64_t>(num_bits); |
| 140 | } |
| 141 | |
| 142 | const uint8_t* bitmap_; |
| 143 | const int64_t num_carry_bits_; // in [1, 8] |
nothing calls this directly
no test coverage detected