Module solana_accounts_db::shared_buffer_reader

source ·
Expand description

SharedBuffer is given a Reader and SharedBufferReader implements the Reader trait. SharedBuffer reads ahead in the underlying file and saves the data. SharedBufferReaders can be created for the buffer and independently keep track of each reader’s read location. The background reader keeps track of the progress of each client. After data has been read by all readers, the buffer is recycled and reading ahead continues. A primary use case is the underlying reader being decompressing a file, which can be computationally expensive. The clients of SharedBufferReaders could be parallel instances which need access to the decompressed data.

Structs§