\brief Construct a view on a buffer at the given offset and length. This function cannot fail and does not check for errors (except in debug builds)
| 397 | /// |
| 398 | /// This function cannot fail and does not check for errors (except in debug builds) |
| 399 | static inline std::shared_ptr<Buffer> SliceBuffer(std::shared_ptr<Buffer> buffer, |
| 400 | const int64_t offset, |
| 401 | const int64_t length) { |
| 402 | return std::make_shared<Buffer>(std::move(buffer), offset, length); |
| 403 | } |
| 404 | |
| 405 | /// \brief Construct a view on a buffer at the given offset, up to the buffer's end. |
| 406 | /// |