| 171 | static constexpr uint8_t kTrailingBitmask[] = {255, 254, 252, 248, 240, 224, 192, 128}; |
| 172 | |
| 173 | static constexpr bool GetBit(const uint8_t* bits, uint64_t i) { |
| 174 | return (bits[i >> 3] >> (i & 0x07)) & 1; |
| 175 | } |
| 176 | |
| 177 | // Gets the i-th bit from a byte. Should only be used with i <= 7. |
| 178 | static constexpr bool GetBitFromByte(uint8_t byte, uint8_t i) { |
nothing calls this directly
no outgoing calls
no test coverage detected