code wiki / (root) / nx_gunzip.nx

nx_gunzip.nx

buildroot/runtime/nx_gunzip.nx

4931 B111 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_gunzip.nx -- CLI for the sovereign decompressor: gzip / zlib / raw DEFLATE -> stdout or file. The missing half of our compression story. nx_gzip COMPRESSES; nothing could decompress, so any HTTP body with Content-Encoding: gzip was unreadable by the sovereign fetch path. nx_gunzip <in.gz> [out] -- auto-detects gzip / zlib / raw by magic nx_gunzip --crc <file> -- print the CRC32 of a file (the gzip integrity primitive) license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_inflate.nx nx_gunzip.nx

imports: nx_syscalls.nxnx_inflate.nx

imported by: nobody (leaf or entry point)

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

main gu_e sys_write sys_exit sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gu_w sys_write ↻ gu_num sys_write ↻ sys_mmap ↻ inf_crc32 inf_gunzip inf_raw sys_mmap ↻ inf_bits inf_build inf_codes inf_decode inf_bits ↻ inf_bits ↻ inf_decode ↻ inf_crc32 ↻ inf_zlib inf_raw ↻ inf_raw ↻ gu_reason gu_e ↻ sys_openat_wr sys_write ↻ sys_close ↻

structs

none

consts

13const GU_CAP: i64 = 268435456
14const GU_MODE: i64 = 0x1a4

functions

16func gu_w(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 calls 1: sys_write
17func gu_e(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(2, s, n); return 0 }
called by 2: gu_reasonmain calls 1: sys_write
18func gu_num(v: i64) -> i64
called by 1: main calls 2: sys_writesys_mmap
33func gu_reason(rc: i64) -> i64
called by 1: main calls 1: gu_e
49func main(argc: i64, argv: *i64) -> i64