diff --git a/Sources/Core/RandomAccessAdaptor.h b/Sources/Core/RandomAccessAdaptor.h index 9c18537f..988073ec 100644 --- a/Sources/Core/RandomAccessAdaptor.h +++ b/Sources/Core/RandomAccessAdaptor.h @@ -84,6 +84,15 @@ namespace spades { } } + /** + * Read the inner stream ahead to make the internal buffer at least `length` bytes long. + */ + void Prefetch(std::size_t length) { + SPADES_MARK_FUNCTION(); + + ExpandTo(length); + } + private: /** * Tries to ensure `buffer` is at least `newBufferSize` bytes long.