code wiki / _hdl_build / nx_gzip.nx
nx_gzip.nx
buildroot/runtime/_hdl_build/nx_gzip.nx
about
nx_gzip.nx -- SOVEREIGN gzip/DEFLATE COMPRESSOR: CLI FRONT END ONLY.
★THE DUPLICATE IS GONE (2026-08-28). Until today this file carried its OWN copy of the entire
compressor -- gz_deflate, gz_compress, the CRC32, the bit writer, the Huffman tables and every
const -- alongside nx_gzip_lib.nx, which nx_host_router imports to compress every response the
estate serves. TWO copies of one DEFLATE. The library's own source had recorded the remedy and
nobody had taken it: nx_gzip.nx MUST be reduced to an import of nx_gzip_lib.nx.
WHAT THE DUPLICATE COST, MEASURED TODAY: adding lazy matching had to be written TWICE, into two
files, and proven twice -- because a fix landing in one copy and not its sibling is half a fix,
and the half left undone is the one that ships. The next change already named on
/compare/performance as rung PF3, dynamic Huffman at a measured further 11.3 percent, would have
paid that tax again.
★A SHARED RULER THAT IS COPIED IS NOT SHARED. This file is now the CLI and nothing else: argument
parsing, the selftest entry, and the report line. Every byte of compression logic lives ONCE, in
the library the serving router already imports -- so the tool that MEASURES the estate's
compression and the code that PERFORMS it can no longer drift apart. That equality is not a
promise here, it is a property: there is only one gz_deflate now.
Usage unchanged: nx_gzip <infile> <outfile> [mode 2 default|0 stored] | selftest
Correctness oracle unchanged: STANDARD gunzip byte-identical.
dependencies 1 imports · 0 importers
imports: nx_gzip_lib.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
| 25 | func main(argc: i64, argv: *i64) -> i64 |