Expand description
File I/O buffered readers for AppendVec
Specialized BufRead-like types for reading account data.
Callers can use these types to iterate efficiently over append vecs. They can do so by repeatedly calling:
fill_buf_required(account_meta_len)to scan the account metadata parts and determine the account data size,- optionally extend the obtained buffer to full account data using
fill_buf_required(account_all_bytes_len) consume(account_all_bytes_len)to move to the next account
When reading full accounts data whose sizes exceed the small stack buffer, the BufReaderWithOverflow
should be used, which supports dynamically allocated buffer for preparing contiguous data slices.
Structs§
- BufReader
With Overflow - A buffered reader that wraps
BufReadinstance and implementsRequiredLenBufRead. - Buffered
Reader - read a file a large buffer at a time and provide access to a slice in that buffer
- Sequential
File Reader - Reader for non-seekable files.
- Sequential
File Reader Builder - Utility for building
SequentialFileReaderwith specified tuning options.
Traits§
- File
BufRead - An extension of the
BufReadtrait for file readers that allow tracking file read position offset. - Required
LenBuf File Read - Required
LenBuf Read - An extension of the
BufReadtrait for readers that require stronger control over returned buffer size.
Functions§
- large_
file_ buf_ reader - Open file at
pathwith buffering reader usingbuf_sizememory and doing read-ahead IO reads (ifio_uringis supported by the platform)