mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
Deflate, Inflate, Gzip, Gunzip, DeflateRaw, InflateRaw and Unzip, from createGzip() and the other factories or new zlib.Gzip(options), are runtime Transform streams over zlib. - scr_zlib.c gains a step engine that follows Node's ZlibContext: lazy init, Unzip's gzip-magic detection, the dictionary retry, Gunzip's multi-member loop, and Node's error messages, codes and errno. - scr_zlib_stream.c, linked when a program uses zlib and streams, runs each write as engine steps on the worker pool with Node's output chunking, the finish flush from 'prefinish', read-side backpressure, flush(), params(), close(), reset() and bytesWritten, and validates options in Node's order. - The fallback declarations add the classes, factories and a literal-typed ZlibConstants; zlib.constants and the module-level Z_* copies bake as literals. Brotli streams and their factories are refused by name. Corpus programs 5370-5377 cover round trips, chunking and event order, errors, options, flush and params, stream/promises, constants and backpressure.