| 238 | /// Output [first..last) is a range of the referenced data at local_index. |
| 239 | template <typename DataIterator> |
| 240 | void ReadRefrencedBlock(const BlockReference &, |
| 241 | std::uint32_t local_index, |
| 242 | DataIterator &first, |
| 243 | DataIterator &last) const |
| 244 | { |
| 245 | DataIterator fixed_lengths = first; // iterator to the fixed lengths part |
| 246 | std::advance(first, BLOCK_SIZE); // advance first to the block data part |
| 247 | for (std::uint32_t i = 0; i < local_index; ++i) |
| 248 | { |
| 249 | first += static_cast<unsigned char>(*fixed_lengths++); |
| 250 | } |
| 251 | |
| 252 | if (local_index < BLOCK_SIZE) |
| 253 | { |
| 254 | last = first + static_cast<unsigned char>(*fixed_lengths); |
| 255 | } |
| 256 | } |
| 257 | }; |
| 258 | |
| 259 | namespace detail |