| 48 | void Clear() { current_byte_ &= bit_mask_ ^ 0xFF; } |
| 49 | |
| 50 | void Next() { |
| 51 | bit_mask_ = static_cast<uint8_t>(bit_mask_ << 1); |
| 52 | ++position_; |
| 53 | if (bit_mask_ == 0) { |
| 54 | // Finished this byte, need advancing |
| 55 | bit_mask_ = 0x01; |
| 56 | bitmap_[byte_offset_++] = current_byte_; |
| 57 | if (ARROW_PREDICT_TRUE(position_ < length_)) { |
| 58 | current_byte_ = bitmap_[byte_offset_]; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void Finish() { |
| 64 | // Store current byte if we didn't went past bitmap storage |