code wiki / (root) / nx_webp_huff_gate.nx

nx_webp_huff_gate.nx

buildroot/runtime/nx_webp_huff_gate.nx

5085 B127 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic webp
docsdependenciesstructsconstsfunctions

about

nx_webp_huff_gate.nx -- proves the VP8L Huffman code-group reader. The property that matters most is T2/T3: a single-symbol tree must decode its symbol while consuming ZERO bits. Every other Huffman path in the tree consumes at least one bit per symbol, so if this collapses to an ordinary canonical table the bitstream desyncs one bit at a time and the image decodes to noise -- silently, with no error anywhere. Constant-alpha and constant-red images (most synthetic PNG-to-WebP conversions) hit this on the very first tree. NON-VACUITY: T8/T9/T10 are negative controls. An all-zero length vector, a null tree and an out-of-range simple symbol must each be REFUSED. If this gate cannot fail it is not measuring anything -- flipping the T8 expectation to == 0 must turn it RED. license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_bitstream.nx nx_huffman.nx nx_webp_huff.nx nx_webp_huff_gate.nx

imports: nx_syscalls.nxnx_bitstream.nxnx_huffman.nxnx_webp_huff.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

22func g_puts(s: *u8) -> i64
29func main() -> i64