code wiki / _hdl_build / _huffman_authored.nx
_huffman_authored.nx
buildroot/runtime/_hdl_build/_huffman_authored.nx
about
AUTHORED BY THE NISHI BUILDER (nx_module_author huffman template) -- canonical Huffman, bits-up
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| none |
functions
| 3 | func 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 |
| 4 | func hbuild(lengths: *i64, n: i64, counts: *i64, symbols: *i64) -> i64 |
| 11 | func hdecode(buf: *u8, len: i64, cursor: *i64, counts: *i64, symbols: *i64) -> i64 |
| 15 | func main() -> i64 |