code wiki / (root) / nx_sevenz.nx

nx_sevenz.nx

buildroot/runtime/nx_sevenz.nx

8325 B162 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind tooltopic sevenz
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_sevenz_lib.nx nx_sevenz.nx

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

main szc_usage szc_w sys_write szc_len sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ szc_streq szc_walk sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close szc_w ↻ sz_count sys_mmap ↻ sz_parse sz_is_7z sz_u32 sz_u64 sz_u32 ↻ sys_mmap ↻ sz_rd8

structs

none

consts

12const SZC_EXIT_USAGE: i64 = 2
13const SZC_EXIT_REFUSE: i64 = 3
14const SZC_EXIT_MEMBER: i64 = 4
15const SZC_OUTFD: i64 = 1
16const SZC_MODE_0644: i64 = 420
17const SZC_NAMES_HEADROOM: i64 = 4096
18const SZC_ST_N: i64 = 8

functions

20func 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
21func szc_w(s: *u8) -> i64 { sys_write(SZC_OUTFD, s, szc_len(s)); return 0 }
22func szc_wn(v: i64) -> i64
36func 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
37func 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
39func szc_detail(b: *u8, n: i64) -> i64
48func szc_usage() -> i64 { szc_w("usage: nx_sevenz list <archive.7z> | extract <archive.7z> <idx> <out_path>\n" as *u8); return SZC_EXIT_USAGE }
called by 1: main calls 1: szc_w
51func szc_walk(path: *u8, out_tbl: *i64, out_names: *i64, st: *i64) -> i64
69func szc_row(tbl: *i64, names: *u8, i: i64) -> i64
86func main(argc: i64, argv: *i64) -> i64