| 175 | } |
| 176 | |
| 177 | void ByteInputStream::skip(int32_t size) { |
| 178 | for (;;) { |
| 179 | int32_t available = current_->size - current_->position; |
| 180 | int32_t numUsed = std::min(available, size); |
| 181 | size -= numUsed; |
| 182 | current_->position += numUsed; |
| 183 | if (!size) { |
| 184 | return; |
| 185 | } |
| 186 | next(); |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | size_t ByteOutputStream::size() const { |
| 191 | if (ranges_.empty()) { |