nx_zstd_seq_gate.nx
buildroot/runtime/nx_zstd_seq_gate.nx
about
nx_zstd_seq_gate.nx -- proves zstd sequence execution and code tables.
T4 is the one that matters. An offset SMALLER than the match length is legal
and common -- it is how zstd encodes runs -- and the copy is REQUIRED to
read bytes it wrote moments earlier in the same operation. The test uses
offset 3 with match length 4 (the fourth byte read is one this copy just
wrote) and offset 1 with match length 5 (a pure run). A bulk move that
snapshots the source region gives the right answer for the first `offset`
bytes and garbage after, so both cases are needed: the offset-1 run fails
loudly, the offset-3 overlap fails on exactly one byte.
T1 pins the DISCONTINUOUS sequence count: the byte itself below 128, a
two-byte form below 255, and an escape to three bytes at exactly 255 biased
by 0x7F00. A plain varint reading mis-sizes the header and every table
after it.
T2/T3 pin the code tables, including that match lengths start at THREE and
that the literal-length baselines are the value itself only up to 15.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_zstd_seq.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
| 24 | func g_puts(s: *u8) -> i64 |
| 31 | func g_putn(v: i64) -> i64 |
| 45 | func main() -> i64 |