pub fn parse_bam_from_reader<R: Read>(
reader: R,
) -> Result<QueryHeader, ParseError>Expand description
Parse a BAM header from any reader (no file path required).
This enables parsing from in-memory buffers (e.g. Cursor<Vec<u8>>)
without writing to a temporary file. Only the header is read;
the reader does not need to contain complete record data.
ยงErrors
Returns ParseError::Noodles if the BAM header cannot be parsed,
ParseError::InvalidFormat if no contigs are found, or
ParseError::TooManyContigs if the limit is exceeded.