nx_zstd_block_gate.nx
buildroot/runtime/nx_zstd_block_gate.nx
about
nx_zstd_block_gate.nx -- proves zstd compressed-block decompression.
T3 is the payoff: a complete Compressed block with HUFFMAN-CODED literals,
assembled byte by byte -- literals header, Huffman tree description, coded
stream, sequences header -- decompressed to its exact bytes. Every layer
below is exercised in one call: header parsing, weight decoding, weight
completion, table build, backward reading, symbol decode.
T5 pins the DISTINCT refusal codes. A block carrying sequences must NOT
quietly emit its literals: that produces output of the right LENGTH and the
wrong BYTES, which a length check passes. FSE sequences, FSE weights and
four-stream literals each get their own code so a caller can tell
'unsupported' from 'corrupt' from 'wrong shape'.
T4 pins that the tree description lives INSIDE compressed_size. Treating
compressed_size as the stream alone over-reads by the description length
and desynchronises the sequences section that follows -- which is why the
sequences byte is asserted to land where it does.
license_tier: ORIGINAL
dependencies 10 imports · 0 importers
imports: nx_syscalls.nxnx_zstd_fse.nxnx_zstd_bits.nxnx_zstd_huf.nxnx_zstd_lit.nxnx_zstd_seq.nxnx_zstd_fse_dec.nxnx_zstd_seqtab.nxnx_zstd_seqdec.nxnx_zstd_block.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
| none |
functions
| 32 | func g_puts(s: *u8) -> i64 |
| 39 | func g_putn(v: i64) -> i64 |
| 53 | func main() -> i64 |