nx_zip_gate.nx
buildroot/runtime/nx_zip_gate.nx
about
nx_zip_gate.nx -- proves the ZIP writer/reader pair by ROUND-TRIP.
T1 pins the CRC ALGORITHM to the classic check value 0xCBF43926 for
"123456789". This matters more than usual here: nx_ogg.nx also implements
something called "CRC-32", using the SAME polynomial UNreflected with zero
init. The two are not interchangeable, and swapping them produces archives
that round-trip perfectly against themselves while every unzip on earth
reports a checksum error. Only an absolute known-value assertion separates
them.
T5 pins the central-directory offset. Readers trust the CD, not the local
headers -- an archive with correct local headers and wrong CD offsets opens
as empty or corrupt, and nothing in the local headers hints at it. The test
resolves each entry's data THROUGH the CD offset and verifies the CRC of
what it finds there.
NON-VACUITY: T7 covers refusals -- a corrupted data byte must fail CRC, a
short buffer must refuse, and a missing EOCD must not be invented.
license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_zip.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 |
| 44 | func main() -> i64 |