| 285 | } |
| 286 | |
| 287 | Result<std::string_view> BufferReader::DoPeek(int64_t nbytes) { |
| 288 | RETURN_NOT_OK(CheckClosed()); |
| 289 | |
| 290 | const int64_t bytes_available = std::min(nbytes, size_ - position_); |
| 291 | return std::string_view(reinterpret_cast<const char*>(data_) + position_, |
| 292 | static_cast<size_t>(bytes_available)); |
| 293 | } |
| 294 | |
| 295 | bool BufferReader::supports_zero_copy() const { return true; } |
| 296 |
nothing calls this directly
no test coverage detected