pub fn seek_to_offset<R: Read + Seek>(
segment: &mut R,
index_file: &TxOffsetIndex,
start_tx_offset: u64,
) -> Result<u64, IndexError>Expand description
Advances the segment reader to the position corresponding to the start_tx_offset
using the index_file for efficient seeking.
Input:
segment- segment readermin_tx_offset- minimum transaction offset in the segmentstart_tx_offset- transaction offset to advance to
Returns the byte position segment is at after seeking.