| 174 | } |
| 175 | |
| 176 | Word NextWord() { |
| 177 | bitmap_ += sizeof(Word); |
| 178 | const Word next_word = load<Word>(bitmap_); |
| 179 | Word word = current_data.word_; |
| 180 | if (may_have_byte_offset && offset_) { |
| 181 | // combine two adjacent words into one word |
| 182 | // |<------ next ----->|<---- current ---->| |
| 183 | // +-------------+-----+-------------+-----+ |
| 184 | // | --- | A | B | --- | |
| 185 | // +-------------+-----+-------------+-----+ |
| 186 | // | | offset |
| 187 | // v v |
| 188 | // +-----+-------------+ |
| 189 | // | A | B | |
| 190 | // +-----+-------------+ |
| 191 | // |<------ word ----->| |
| 192 | word >>= offset_; |
| 193 | word |= next_word << (sizeof(Word) * 8 - offset_); |
| 194 | } |
| 195 | current_data.word_ = next_word; |
| 196 | return word; |
| 197 | } |
| 198 | |
| 199 | uint8_t NextTrailingByte(int& valid_bits) { |
| 200 | uint8_t byte; |
no outgoing calls