read_last_n_line_offsets

Function read_last_n_line_offsets 

Source
pub fn read_last_n_line_offsets<R: Read + Seek>(
    rs: &mut R,
    max_lines: usize,
    keep_first: bool,
) -> Result<(Vec<i64>, usize)>
Expand description

Find the byte offsets of the last N lines in a seekable reader.

Returns (offsets, total_lines). If keep_first is true, always includes offset 0 (start of file).