| 74 | } |
| 75 | |
| 76 | size_t ByteInputStream::remainingSize() const { |
| 77 | if (ranges_.empty()) { |
| 78 | return 0; |
| 79 | } |
| 80 | const auto* lastRange = &ranges_[ranges_.size() - 1]; |
| 81 | auto cur = current_; |
| 82 | size_t total = cur->size - cur->position; |
| 83 | while (++cur <= lastRange) { |
| 84 | total += cur->size; |
| 85 | } |
| 86 | return total; |
| 87 | } |
| 88 | |
| 89 | std::streampos ByteInputStream::tellp() const { |
| 90 | if (ranges_.empty()) { |
no test coverage detected