nx_zlib_wrap.nx
buildroot/runtime/nx_zlib_wrap.nx
about
nx_zlib_wrap.nx -- RFC 1950 zlib container (DEFLATE + headers + Adler-32).
CAPABILITY_COMPLETENESS: FULL
zlib stream layout per RFC 1950:
+---+---+ 2-byte header
|CMF|FLG|
+---+---+
| ... | DEFLATE-compressed data (RFC 1951)
+-------+
|Adler32| 4-byte big-endian Adler-32 of uncompressed data
+-------+
CMF (compression method + flags):
bits 0-3 CM (4 = deflate is reserved; 8 = deflate stream)
bits 4-7 CINFO (log2(window-size) - 8); for 32 KB window = 7
FLG:
bits 0-4 FCHECK -- chosen so (CMF*256 + FLG) mod 31 == 0
bit 5 FDICT -- 1 if preset dictionary in use (rare; refused
in v1; queued as `feedback-preset-dict` work)
bits 6-7 FLEVEL -- compression-level hint (advisory; ignored)
genealogy_id: rfc1950_zlib_1996
lineage_id: nx_zlib_wrap_v1
Composes: nx_deflate (INFLATE) + nx_adler32 (already shipped).
dependencies 5 imports · 10 importers
imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_deflate.nxnx_adler32.nx
imported by: nx_fbx_measure.nxnx_https_get_cli2.nxnx_lib_pdf_stream_diag.nxnx_nxa_anim.nxnx_nxa_hair.nxnx_nxa_skin.nxnx_pdf_text.nxnx_png_decoder.nxnx_sovgit_obj.nxnx_zlib_real_test.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 56 | struct NxZlibResult |
consts
| 41 | const NX_MAGIC_16449714: i64 = 16449714 |
| 42 | const NX_MAGIC_30720: i64 = 30720 |
| 46 | const NX_ZLIB_OK: nx_int = 0 |
| 47 | const NX_ZLIB_ERR_TOO_SHORT: nx_int = 1 |
| 48 | const NX_ZLIB_ERR_BAD_METHOD: nx_int = 2 |
| 49 | const NX_ZLIB_ERR_BAD_CHECK: nx_int = 3 |
| 50 | const NX_ZLIB_ERR_PRESET_DICT: nx_int = 4 |
| 51 | const NX_ZLIB_ERR_DEFLATE: nx_int = 5 |
| 52 | const NX_ZLIB_ERR_ADLER_MISMATCH: nx_int = 6 |
| 69 | const NX_ZLIB_RESULT_BYTES: nx_size = 80 |
functions
| 73 | func nx_zlib_inflate(input: *u8, input_size: nx_int, |
| 183 | func main() -> nx_int |