code wiki / _hdl_build / nx_inflate_gate.nx
nx_inflate_gate.nx
buildroot/runtime/_hdl_build/nx_inflate_gate.nx
about
nx_inflate_gate.nx -- PROVE THE DECOMPRESSOR AGAINST AN INDEPENDENT IMPLEMENTATION.
★A ROUND-TRIP AGAINST OUR OWN COMPRESSOR WOULD VALIDATE ITS OWN BUGS. If nx_gzip and nx_inflate
shared a misreading of RFC 1951 they would agree perfectly and both be wrong -- the banked
"a round-trip equivalence gate cannot kill a symmetric mutant" law, applied to compression. So
the fixture below is a REAL gzip stream produced by an INDEPENDENT implementation (system gzip),
embedded byte-for-byte, together with the exact plaintext it must yield. Agreement here is
cross-implementation evidence, not self-consistency.
The CRC32 tooth uses the PUBLISHED IEEE check value for "123456789" (0xCBF43926) -- a constant
from the standard itself, not a number we produced and then declared correct.
NEGATIVE CONTROLS ARE THE POINT. A decompressor that silently truncates on corruption is worse
than one that is absent, because it hands you plausible partial data. Every wall is fired in-run.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_inflate.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 21 | const IG_N: i64 = 46 |
functions
| 22 | func ig_fixture() -> *u8 |
| 39 | func ig_expect() -> *u8 { return "hello hello hello hello world world world" as *u8 } called by 1: main |
| 41 | func main(argc: i64, argv: *i64) -> i64 |