nx_varfacts_lib.nx
buildroot/runtime/nx_varfacts_lib.nx
about
nx_varfacts_lib.nx -- VaM .var PACKAGE FACT EXTRACTION CORE (conversion tier, VaM lane).
A .var is a ZIP archive. THE WALL THIS LANE LIVES BEHIND (standing policy 1785794796 +
measure-dont-ship): VaM is a CAPABILITY TARGET -- asset BYTES (meshes/textures/morph deltas)
never enter our products or our published plane. What this core reads is the CENTRAL DIRECTORY
(file NAMES + sizes = the package's own manifest) and meta.json (the package's own declared
license) -- the package describing itself, never its content. Extracted MEASUREMENTS flow to
refcorpus behind the k>=8 admission wall like every other reference corpus.
COMPOSES INCUMBENTS: EOCD/central-directory walk = the nx_zip_read shape (that organ is a
hardwired PyTorch-.bin test, not a library -- the walk is factored HERE as callables); ZIP
method-8 members inflate via nx_deflate_inflate, the SAME raw-DEFLATE core under nx_gzip_wrap
and nx_zlib_wrap (capacity-bounded; NOT the retired duplicate nx_inflate, debt 1785854636).
★TAIL-WINDOW CONTRACT: the EOCD + central directory live at the END of a ZIP, so a 519MB .var
measures from its last few MB. The caller hands the TAIL bytes + the true file size; if the
central directory starts before the window, the probe REFUSES (ok=0) -- a partial census is a
plausible undercount, which is worse than absence.
Fact slots (flat i64, VF_N_SLOTS):
[0] ok [1] entries [2] morphs(.vmi) [3] scenes(Saves/scene/*.json) [4] textures(jpg/png/tif)
[5] clothing(/Clothing/) [6] hair(/Hair/) [7] plugins(.cs/.cslist/.dll) [8] appearance(.vap)
[9] meta_found [10] meta_lho [11] meta_method [12] meta_csize [13] meta_usize
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_deflate.nx
imported by: nx_ingest_audit.nxnx_varfacts.nxnx_varfacts_gate.nx
structs
| none |
consts
| 27 | const VF_MAGIC_1024: i64 = 1024 |
| 28 | const VF_MAGIC_4194304: i64 = 4194304 |
| 30 | const VF_N_SLOTS: i64 = 14 |
functions
| 32 | func vf_u16(b: *u8, o: i64) -> i64 { return (b[o] as i64 & 0xff) | ((b[o+1] as i64 & 0xff) << 8) } |
| 33 | func vf_u32(b: *u8, o: i64) -> i64 { return (b[o] as i64 & 0xff) | ((b[o+1] as i64 & 0xff) << 8) | ((b[o+2] as i64 & 0xff) << 16) | ((b[o+3] as i64 & 0xff) << 24) } called by 1: vf_probe |
| 36 | func vf_ends(name: *u8, nl: i64, suf: *u8) -> i64 called by 1: vf_probe |
| 44 | func vf_has(name: *u8, nl: i64, sub: *u8) -> i64 called by 1: vf_probe |
| 59 | func vf_probe(tail: *u8, tailn: i64, file_size: i64, facts: *i64) -> i64 |
| 141 | func vf_license(body: *u8, csize: i64, method: i64, usize: i64, out: *u8) -> i64 |