nx_zip_extract1.nx
buildroot/runtime/nx_zip_extract1.nx
about
nx_zip_extract1.nx -- sovereign single-entry ZIP extractor (STORED or DEFLATE).
Reads a .zip whose FIRST local file entry is the payload (the shape HF ships for
small single-file dataset archives, e.g. whyen-wang/coco_keypoints/data/
keypoints_validation.zip -> keypoints_validation.json), inflates it with the
shipped sovereign nx_deflate_inflate, and writes the decompressed bytes out.
This is the "eat the debt" companion to the main-API dataset fetch: the HF
datasets-server (datasets-server.huggingface.co) 503s our client for EVERY route
(its own /healthcheck 503s -> HF-side/edge, not a fetcher bug), so dataset CONTENT
is reached via the WORKING main API (tree -> LFS resolve -> file) and decompressed
here. 100% sovereign: own TLS fetch (upstream) + own DEFLATE (here); the only
non-Nishi input is the fetched archive bytes.
Config (relative to nxc2 cwd; the build/run launcher does not forward argv):
data/mp_zip_in.txt -- path to the .zip on disk
data/mp_zip_out.txt -- path to write the decompressed entry
nx_safety_envelope:
intended_use: decompress a fetched dataset archive (offline, local file)
sil_target: SIL1
verdict: NOT_YET_EVALUATED
genealogy_id: pkware/appnote + ietf/rfc_1951 lineage_id: nx_zip_extract1_v1
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_deflate.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
| 25 | const K_MAGIC_4096: i64 = 4096 |
| 26 | const K_MAGIC_1024: i64 = 1024 |
| 27 | const K_MAGIC_65536: i64 = 65536 |
functions
| 29 | func ze_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return n } |
| 30 | func ze_putn(v: i64) -> i64 |
| 45 | func ze_u16(b: *u8, o: i64) -> i64 { return (b[o] as i64) + ((b[o+1] as i64) << 8) } called by 1: main |
| 46 | func ze_u32(b: *u8, o: i64) -> i64 called by 1: main |
| 51 | func ze_read_all(path: *u8, buf: *u8, cap: i64) -> i64 |
| 65 | func ze_write_all(path: *u8, buf: *u8, n: i64) -> i64 |
| 79 | func ze_cfg(path: *u8, out: *u8, cap: i64) -> i64 |
| 105 | func main() -> i64 |