code wiki / _hdl_build / nx_cms_snapshot.nx

nx_cms_snapshot.nx

buildroot/runtime/_hdl_build/nx_cms_snapshot.nx

5508 B146 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic cms
docsdependenciesstructsconstsfunctions

about

nx_cms_snapshot.nx -- CMS W4: a binary-safe site SNAPSHOT/RESTORE archive (the UpdraftPlus class). One file packs N named files length-prefixed so ANY bytes survive (newlines, high bytes, NULs): "NXSNAP1\n" then per entry: "N"<namelen-dec>"\n"<name> "D"<datalen-dec>"\n"<data> then "END\n" Restore is BYTE-EXACT (the additive-history law: a restore brings back exactly what was archived). Zero interpretation of the payload -> images, binary stores, anything round-trips. Reusable. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_cms_snapshot.nx nx_cms_admin.nx nx_cms_snapshot_test.nx

imports: nx_syscalls.nx

imported by: nx_cms_admin.nxnx_cms_snapshot_test.nx

structs

none

consts

8const K_MAGIC_8388608: i64 = 8388608
9const K_MAGIC_1024: i64 = 1024

functions

11func snap_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: snap_pack
12func snap_emit_num(out: *u8, o: i64, v: i64) -> i64
called by 1: snap_pack calls 1: sys_mmap
25func snap_read_file(path: *u8, out: *u8, cap: i64) -> i64
38func snap_join(out: *u8, dir: *u8, name: *u8, nlen: i64) -> i64
51func snap_pack(dir: *u8, names: *i64, nn: i64, out: *u8, cap: i64) -> i64
85func snap_num(arc: *u8, n: i64, pp: *i64) -> i64
called by 1: snap_unpack
105func snap_unpack(arc: *u8, n: i64, dir: *u8) -> i64