code wiki / _hdl_build / nx_sovgit_pack_gate.nx

nx_sovgit_pack_gate.nx

buildroot/runtime/_hdl_build/nx_sovgit_pack_gate.nx

4178 B87 linesdepth 8pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic sovgit
docsdependenciesstructsconstsfunctions

about

nx_sovgit_pack_gate.nx -- ★SOVGIT rung X1b: generate a valid git PACKFILE (PACK v2, object-format=sha256) from the X0 objects, so STOCK `git index-pack` / `git unpack-objects` reads + verifies it. The packfile is the core of the git wire (smart-HTTP git-upload-pack streams one on clone/fetch) AND git's efficient storage. Pure reuse of X0: sha256_digest (trailer) + sg_zwrap (per-object zlib). Pack entry = varint(type<<4|rawsize) + zlib(RAW content) (the "type size\0" frame is NOT in the pack -- type+size live in the entry header). license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_sovgit_obj.nx nx_sovgit_pack_gate.nx

imports: nx_sovgit_obj.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main hw pk_be32 pk_object pk_objhdr sg_zwrap dfe_compress sys_mmap dfe_fill_tables dfe_deflate sys_mmap ↻ dfe_bits dfe_hash dfe_matchlen dfe_sym dfe_bits ↻ dfe_rev dfe_rev ↻ sys_munmap sys_munmap ↻ sg_be32 adler32 sg_oid_raw sys_mmap ↻ sg_frame sg_cpy sg_slen sg_dec sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word

structs

none

consts

none

functions

8func hw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main
9func pn(v: i64) -> i64 { let b: *u8 = sys_mmap(32); var x: i64 = v; var i: i64 = 31; if x == 0 { b[i] = 48 as u8; i = i - 1 } while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 } sys_write(1, (b as i64 + i + 1) as *u8, 31 - i); return 0 }
called by 1: main
11func pk_be32(out: *u8, at: i64, v: i64) -> i64
called by 1: main
20func pk_objhdr(out: *u8, at: i64, typ: i64, size: i64) -> i64
called by 1: pk_object
30func pk_object(out: *u8, at: i64, typ: i64, content: *u8, clen: i64) -> i64
called by 1: main calls 2: pk_objhdrsg_zwrap
37func main() -> i64