| 63 | } |
| 64 | |
| 65 | inline uint8_t* BitWriter::GetNextBytePtr(int num_bytes) { |
| 66 | Flush(/* align */ true); |
| 67 | buffer_->reserve(KUDU_ALIGN_UP(byte_offset_ + num_bytes, 8)); |
| 68 | buffer_->resize(byte_offset_ + num_bytes); |
| 69 | uint8_t* ptr = buffer_->data() + byte_offset_; |
| 70 | byte_offset_ += num_bytes; |
| 71 | DCHECK_LE(byte_offset_, buffer_->capacity()); |
| 72 | return ptr; |
| 73 | } |
| 74 | |
| 75 | template<typename T> |
| 76 | inline void BitWriter::PutAligned(T val, int num_bytes) { |