code wiki / (root) / nx_bam_file_compose_test.nx

nx_bam_file_compose_test.nx

buildroot/runtime/nx_bam_file_compose_test.nx

3938 B101 linesdepth 7pulls 13 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_bam_file_compose_test.nx -- end-to-end .bam stream composition. Validates the full BAM-on-disk loop: nx_bam_write_record -> binary record bytes nx_bgzf_write_stored_block -> wrapped as a BGZF block nx_bgzf_eof_marker -> appended as the spec-required terminator nx_gzip_inflate -> inflate the BGZF block back inflated bytes equal the original binary record byte-for-byte This is the substrate-honesty audit smoke for G6.0d + G6.0e: individual KATs already verify each primitive in isolation; this one verifies the composition contract that real BAM files require. Composes against the canonical "r1" / 3M / ACG / qual=[37,37,37] record from nx_bam_test.nx Section D so the byte-exact reference payload is known (48 bytes). expect_exit: 0 license_tier: ORIGINAL

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_const.nx nx_bam.nx nx_bgzf.nx nx_gzip_wrap.nx nx_bam_file_compose_test.nx

imports: nx_syscalls.nxnx_const.nxnx_bam.nxnx_bgzf.nxnx_gzip_wrap.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_bam_write_record nx_le_write_u32 nx_le_write_u16 nx_bam_pack_cigar nx_le_write_u32 ↻ nx_bam_pack_seq nx_bam_iupac_to_nibble nx_bgzf_write_stored_block nx_le_write_u16 ↻ nx_crc32 nx_crc32_update nx_crc32_init nx_crc32_table_at nx_le_write_u32 ↻ nx_bgzf_eof_marker nx_gzip_inflate sys_mmap ↻ _gz_read_u32_le _gz_read_u16_le _gz_skip_cstring nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl sys_mmap ↻ nx_huffman_build sys_mmap ↻ _deflate_build_static_dist sys_mmap ↻ nx_huffman_build ↻

structs

none

consts

none

functions

28func main() -> i64