code wiki / _hdl_build / _huffman_authored.nx

_huffman_authored.nx

buildroot/runtime/_hdl_build/_huffman_authored.nx

1726 B25 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

AUTHORED BY THE NISHI BUILDER (nx_module_author huffman template) -- canonical Huffman, bits-up

dependencies 1 imports · 0 importers

nx_syscalls.nx _huffman_authored.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap hbuild sys_mmap ↻ hdecode hbr sys_exit

structs

none

consts

none

functions

3func hbr(buf: *u8, len: i64, cursor: *i64, n: i64) -> i64 { var val: i64=0; var got: i64=0; while got<n { let bp: i64=cursor[0]>>3; if bp>=len { return 0-1 } let bit: i64=((buf[bp] as i64)>>(cursor[0]&7))&1; val=val|(bit<<got); cursor[0]=cursor[0]+1; got=got+1 } return val }
called by 1: hdecode
4func hbuild(lengths: *i64, n: i64, counts: *i64, symbols: *i64) -> i64
called by 1: main calls 1: sys_mmap
11func hdecode(buf: *u8, len: i64, cursor: *i64, counts: *i64, symbols: *i64) -> i64
called by 1: main calls 1: hbr
15func main() -> i64