Create a new BAM writer with specified options
Writer configuration options
Write complete BAM data to memory as binary string
SAM header information
Iterable of SAM alignment records
Promise resolving to BAM binary data
Write BAM data to file using Bun's optimized file I/O
Path to output BAM file
SAM header information
Iterable of SAM alignment records
Create a writable stream for streaming BAM output
Writable stream for BAM data
Serialize a single alignment record to binary format
SAM alignment record
Reference sequence names
Serialized alignment binary data
Get writer performance statistics and configuration
Writer statistics and capabilities
Static
createCreate an optimized BAM writer for high-performance scenarios
Performance tuning options
Optimized writer instance
BAM writer with BGZF compression and binary serialization
Designed for memory efficiency with large BAM files from modern sequencers. Handles real-world BAM complexity including:
Example: Basic usage
Example: File writing
Example: Streaming