non-owning view into a range of bits
| 65 | |
| 66 | /// non-owning view into a range of bits |
| 67 | struct Bitmap { |
| 68 | Bitmap() = default; |
| 69 | Bitmap(const uint8_t* d, Range r) : data(d), range(r) {} |
| 70 | explicit Bitmap(const std::shared_ptr<Buffer>& buffer, Range r) |
| 71 | : Bitmap(buffer ? buffer->data() : nullptr, r) {} |
| 72 | |
| 73 | const uint8_t* data = nullptr; |
| 74 | Range range; |
| 75 | |
| 76 | bool AllSet() const { return data == nullptr; } |
| 77 | }; |
| 78 | |
| 79 | enum class OffsetBufferOpOutcome { |
| 80 | kOk, |