code wiki / _hdl_build / _pdf_stream_authored.nx

_pdf_stream_authored.nx

buildroot/runtime/_hdl_build/_pdf_stream_authored.nx

1411 B26 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind tooltopic pdf
docsdependenciesstructsconstsfunctions

about

AUTHORED BY THE NISHI BUILDER (pdf-stream template) -- extract + FlateDecode a PDF stream, bits-up

dependencies 1 imports · 0 importers

_inflate_lib_authored.nx _pdf_stream_authored.nx

imports: _inflate_lib_authored.nx

imported by: nobody (leaf or entry point)

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

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close pdf_extract psub inflate sys_mmap ↻ ibr ihb sys_mmap ↻ icodes ihd ibr ↻ ibr ↻ ihd ↻

structs

none

consts

none

functions

3func psub(buf: *u8, n: i64, from: i64, needle: *u8, nl: i64) -> i64 { var i: i64=from; while i+nl<=n { var ok: i64=1; var j: i64=0; while j<nl { if buf[i+j]!=needle[j] { ok=0; j=nl } else { j=j+1 } } if ok==1 { return i } i=i+1 } return 0-1 }
called by 1: pdf_extract
4func pdf_extract(pdf: *u8, pdflen: i64, out: *u8) -> i64
called by 1: main calls 2: psubinflate
17func main() -> i64