code wiki / _hdl_build / nx_sovgit_unpack_gate.nx

nx_sovgit_unpack_gate.nx

buildroot/runtime/_hdl_build/nx_sovgit_unpack_gate.nx

5257 B94 linesdepth 8pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic sovgit
docsdependenciesstructsconstsfunctions

about

nx_sovgit_unpack_gate.nx -- ★SOVGIT rung X1d: PACK PARSER. Reads a git packfile (ours OR git-generated), extracts each object (varint type+size header, then inflate the per-object zlib stream), reframes "<type> <size>\0<content>", SHA-256s it + writes it loose. This is the INVERSE of X1b (pack gen) and the CORE of git-receive-pack (push = unpack the client's pack). Pure reuse of X0: nx_zlib_inflate (per-object stream, bytes_consumed advances to the next object) + sha256 + sg_write_loose. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_sovgit_obj.nx nx_sovgit_unpack_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 sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close be32r pn sys_mkdir nx_zlib_inflate sys_mmap ↻ nx_deflate_inflate sys_mmap ↻ nx_bitstream_alloc sys_mmap ↻ _deflate_inflate_block nx_bitstream_read_lsb nx_bitstream_bits_remainin _bs_peek_byte nx_bitstream_byte_align nx_bitstream_read_byte_ali nx_bitstream_byte_align ↻ _deflate_build_static_litl sys_mmap ↻ nx_huffman_build sys_mmap ↻ _deflate_build_static_dist sys_mmap ↻ nx_huffman_build ↻ _deflate_decode_huffman_bl nx_huffman_decode_lsb nx_bitstream_read_lsb ↻ _deflate_length_base _deflate_length_extra nx_bitstream_read_lsb ↻ _deflate_distance_base _deflate_distance_extra _deflate_copy_overlap

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
10func show64(g: *u8) -> i64 { var i: i64 = 0; while i < 64 { sys_write(1, (g as i64 + i) as *u8, 1); i = i + 1 } return 0 }
called by 1: main
11func hexhas(list: *u8, n: i64, want: *u8) -> i64
called by 1: main
21func type_str(t: i64) -> *u8
called by 1: main
28func be32r(b: *u8, at: i64) -> i64 { return ((b[at] as i64) << 24) | ((b[at + 1] as i64) << 16) | ((b[at + 2] as i64) << 8) | (b[at + 3] as i64) }
called by 1: main
30func main(argc: i64, argv: *i64) -> i64