nx_sevenz.nx
buildroot/runtime/nx_sevenz.nx
about
nx_sevenz.nx -- THE 7z ARCHIVE COMMAND (/compare/modding MD29 sz_walk, 2026-09-06). A thin caller of nx_sevenz_lib so the
command line and the bundle walker read a 7z through ONE container reader and ONE decoder (nx_lzma_lib), and every member's
bytes are checked against the archive's OWN CRC-32 digest -- the container is the oracle for the decoder.
usage: nx_sevenz list <archive.7z> one MEMBER row per non-directory file, then one SEVENZ summary row
nx_sevenz extract <archive.7z> <idx> <out_path> write member idx (its decode must be OK or STORED)
exits: 0 every data member decoded and CRC-verified | 2 usage | 3 REFUSED (unreadable, not a 7z, truncated, a CRC or the
header refused -- the reason is on the line) | 4 walked, but a member failed or its coder is unsupported (named per row)
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_sevenz_lib.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
| 12 | const SZC_EXIT_USAGE: i64 = 2 |
| 13 | const SZC_EXIT_REFUSE: i64 = 3 |
| 14 | const SZC_EXIT_MEMBER: i64 = 4 |
| 15 | const SZC_OUTFD: i64 = 1 |
| 16 | const SZC_MODE_0644: i64 = 420 |
| 17 | const SZC_NAMES_HEADROOM: i64 = 4096 |
| 18 | const SZC_ST_N: i64 = 8 |
functions
| 20 | func szc_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: szc_w |
| 21 | func szc_w(s: *u8) -> i64 { sys_write(SZC_OUTFD, s, szc_len(s)); return 0 } |
| 22 | func szc_wn(v: i64) -> i64 |
| 36 | func szc_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 37 | func szc_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c < 48 { return 0 - 1 } if c > 57 { return 0 - 1 } v = v * 10 + (c - 48); i = i + 1 } if i == 0 { return 0 - 1 } return v } called by 1: main |
| 39 | func szc_detail(b: *u8, n: i64) -> i64 |
| 48 | func szc_usage() -> i64 { szc_w("usage: nx_sevenz list <archive.7z> | extract <archive.7z> <idx> <out_path>\n" as *u8); return SZC_EXIT_USAGE } |
| 51 | func szc_walk(path: *u8, out_tbl: *i64, out_names: *i64, st: *i64) -> i64 |
| 69 | func szc_row(tbl: *i64, names: *u8, i: i64) -> i64 |
| 86 | func main(argc: i64, argv: *i64) -> i64 |