zip.deflate / zip.inflate — raw zlib over dog/git/ZINFExpose ZINFDeflate/ZINFInflate as a zip JS global so JS can (de)compress
arbitrary bytes — the missing primitive for a pure-JS git-wire client (REF_DELTA
record bodies, loose objects). Reopens JS-018 (no longer MOOT: the wire needs
standalone compression, not just pack-internal). Method: Issues.
git.pack only (de)compresses WHOLE records, no
raw transform. dog/git/ZINF.h (libdog) has ZINFInflate/ZINFDeflate.zip.deflate(bytes[, out]) -> Uint8Array | n and zip.inflate(bytes[, out]).out: fresh sized Uint8Array. out is a Buf: write into IDLE, advance
fed, return n (zero-copy), mirroring tok.parse/pack shape.dog/git/ZINF (libdog, already linked). No new abc, NO
dog. Holds no refs (rule #4). Leaf sizes nothing — JS owns the out buffer._deflate(src,out,outOff)->n / _inflate(src,out,outOff)->n
in a new js/zip.cpp (JABCZipInstall, like ansi.cpp); install in main.cpp.zip wrapper sizes the out scratch (deflate: len+len>>10+128; inflate:
grow-and-retry on NOROOM, like keeper.js readRecord) — sizing is JS's job.test/js/get/zip.js (registered JABCzip, helpers from
test/js/lib/): deflate→inflate round-trip (random + a real blob borrowed
from test/get/ fixtures); empty input; large (>64 KiB); known zlib blob.js/zip.cpp + main.cpp install + CMakeLists (src + test); update
js/INDEX.md (+ js/API.md).c3fbdda5: js/zip.cpp (zip._deflate/_inflate leaves) + the
zip.deflate/inflate JS sugar; ctest JABCzip green, full JABC 23/23.ZINFInflate wraps next_out on a full slice instead of
returning NOROOM, forcing the XOR head-sentinel hack in zip.cpp (removable
once GIT-011 lands).