write_gff_output

Function write_gff_output 

Source
pub fn write_gff_output(
    gff_path: &Path,
    blocks: &[(u32, u64, u64)],
    output_path: &Option<PathBuf>,
    verbose: bool,
) -> Result<()>
Expand description

Write selected byte ranges (“blocks”) of a GFF file to an output file or stdout.

Features:

  • Uses memory-mapped I/O for efficiency.
  • Merges adjacent or overlapping ranges before writing.
  • Uses vectored I/O (write_vectored) to minimize syscalls.

§Arguments

  • gff_path: Path to the source GFF file.
  • blocks: A list of (start, end) byte ranges to extract.
  • output_path: Output file path. If None, writes to stdout.
  • _allowed_types: Reserved for future filtering by feature type (currently unused).
  • verbose: Whether to print diagnostic output.

§Errors

Returns any I/O or mmap errors.