Skip to main content

parse_binary_file

Function parse_binary_file 

Source
pub fn parse_binary_file(
    file_content: &[u8],
    format: FileFormat,
) -> Result<QueryHeader, ParseError>
Expand description

Parse binary file content (for BAM/CRAM/FASTA files)

BAM and CRAM are parsed directly from memory via a Cursor<&[u8]>. FASTA still requires a temporary file since the parser must read full sequences to compute contig lengths.

ยงErrors

Returns ParseError::Io if a temporary file cannot be created or written (FASTA only), or ParseError::ParseFailed if parsing fails.