code wiki / (root) / nx_gzip_inflate_kat_test.nx

nx_gzip_inflate_kat_test.nx

buildroot/runtime/nx_gzip_inflate_kat_test.nx

22666 B887 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic gzip
docsdependenciesstructsconstsfunctions

about

nx_gzip_inflate_kat_test.nx -- gzip READ path KAT (Content-Encoding: gzip). Proves nx_gzip_inflate decodes REAL python-`gzip` streams (what servers actually send) end-to-end: RFC1952 header + DEFLATE payload + CRC32 + ISIZE. Composes the proven gunzip (nx_gzip_wrap -> nx_deflate_inflate + nx_crc32), not reinvented. This is the browser's gzip-page READ keystone. G1 plain stream (FLG=0) -> OK, bytes exact, crc & isize verify G2 stream WITH FNAME header field -> OK (optional-field walk exercised) G3 corrupted CRC32 trailer -> NX_GZ_ERR_CRC_MISMATCH (neg-control) G4 corrupted magic ID1 -> NX_GZ_ERR_BAD_MAGIC (neg-control) G3/G4 make the gate DISCRIMINATE (it rejects corruption, not just passes). expect_exit: 0 license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_gzip_wrap.nx nx_gzip_inflate_kat_test.nx

imports: nx_syscalls.nxnx_runtime.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_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 ↻ _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 ↻

structs

none

consts

none

functions

18func main() -> nx_int