code wiki / (root) / nx_deflate_huffman_test.nx

nx_deflate_huffman_test.nx

buildroot/runtime/nx_deflate_huffman_test.nx

7142 B192 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic deflate
docsdependenciesstructsconstsfunctions

about

nx_deflate_huffman_test.nx -- regression smoke for the BTYPE=01 (static Huffman) and BTYPE=10 (dynamic Huffman) inflate paths. SURFACED 2026-05-18: nx_deflate.nx self-reports "CAPABILITY_COMPLETENESS: FULL -- all three BTYPE handlers (stored, static Huffman, dynamic Huffman) implemented end-to-end" but only BTYPE=00 (stored) was ever exercised by an existing smoke. Real PNGs from gen-img use BTYPE=01/10 and crashed the substrate. This test pins the Huffman paths with python-zlib ground-truth byte sequences so the false-OK can't return. Fixtures captured via: python3 -c "import zlib; co = zlib.compressobj(level=zlib.Z_BEST_SPEED, wbits=-zlib.MAX_WBITS, strategy=zlib.Z_FIXED); print(co.compress(b'Hello, world!') + co.flush())"

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_deflate.nx nx_deflate_huffman_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_deflate.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_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 ↻ _deflate_decode_huffman_bl nx_huffman_decode_lsb nx_bitstream_read_lsb ↻ _deflate_length_base _deflate_length_extra nx_bitstream_read_lsb ↻ _deflate_distance_base _deflate_distance_extra _deflate_copy_overlap sys_mmap ↻ _deflate_build_dynamic_tre nx_bitstream_read_lsb ↻ sys_mmap ↻ _deflate_cl_order nx_huffman_build ↻ nx_huffman_decode_lsb ↻ _deflate_bytes_consumed

structs

none

consts

none

functions

21func main() -> nx_int