| 108 | |
| 109 | template <typename Source, typename OutIt> |
| 110 | static OutIt ReadAndDecode(Source & source, OutIt it) |
| 111 | { |
| 112 | auto const numBlocks = ReadVarUint<uint64_t, Source>(source); |
| 113 | CHECK_LESS(numBlocks, std::numeric_limits<size_t>::max(), ()); |
| 114 | |
| 115 | BufferT bwtBuffer, revBuffer; |
| 116 | |
| 117 | for (size_t i = 0; i < static_cast<size_t>(numBlocks); ++i) |
| 118 | { |
| 119 | ReadAndDecodeBlock(source, bwtBuffer, revBuffer); |
| 120 | std::copy(revBuffer.begin(), revBuffer.end(), it); |
| 121 | } |
| 122 | return it; |
| 123 | } |
| 124 | }; |
| 125 | } // namespace coding |