code wiki / _hdl_build / nx_deflate_enc_gate.nx

nx_deflate_enc_gate.nx

buildroot/runtime/_hdl_build/nx_deflate_enc_gate.nx

3435 B76 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind gate/prooftopic deflate
docsdependenciesstructsconstsfunctions

about

nx_deflate_enc_gate.nx -- prove the sovereign DEFLATE compressor round-trips against our own inflater. T1 compresses (output smaller than input on compressible data) T2 our nx_deflate.nx INFLATE decodes it with no error T3 the decoded bytes are BYTE-IDENTICAL to the original (correctness) T4 a second dataset (image-like: zero runs + repeats) also round-trips + compresses license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_deflate_enc.nx nx_deflate.nx nx_deflate_enc_gate.nx

imports: nx_syscalls.nxnx_deflate_enc.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 roundtrip sys_mmap ↻ dfe_compress sys_mmap ↻ dfe_fill_tables dfe_deflate sys_mmap ↻ dfe_bits dfe_hash dfe_matchlen dfe_sym dfe_bits ↻ dfe_rev dfe_rev ↻ sys_munmap sys_munmap ↻ hw sys_write pn sys_mmap ↻ sys_write ↻ 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 ↻

structs

none

consts

none

functions

11func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: roundtripmain calls 1: sys_write
12func pn(v: i64) -> i64
called by 2: roundtripmain calls 2: sys_mmapsys_write
23func roundtrip(src: *u8, slen: i64, label: *u8) -> i64
44func main() -> i64