| 161 | } |
| 162 | |
| 163 | void SetFirstFilePosition(std::streambuf& buffer) { |
| 164 | const auto pos = buffer.pubseekoff(0, std::ios_base::beg); |
| 165 | if (pos < 0) { |
| 166 | throw std::ios_base::failure("Failed to set first stream position"); |
| 167 | } |
| 168 | } |
| 169 | uint64_t StepFilePosition(std::streambuf& buffer, uint64_t steps) { |
| 170 | const auto pos = buffer.pubseekoff( |
| 171 | static_cast<std::streambuf::pos_type>(steps), std::ios_base::cur); |