Skip to content

node:zlib: stream objects missing .on/.pipe/.write (Transform interface) + brotli fns + Z_* constants (43 radar runtime-fails) #1843

Description

@proggeramlug

Summary

node:zlib is measurable now (#1778 linked the feature; compile-fail 50→3) and shows 43 runtime-fails. Clustered from the #800 radar (perry 0.5.1029):

Clusters (by impact)

  1. zlib stream objects aren't proper streams (~15 tests)Gzip/Deflate/Brotli* instances are missing the Transform-stream interface:
    • undefined.on (5), on is not a function (2) — e.g. test-zlib-close-after-error.js, test-zlib-object-write.js
    • undefined.pipe (4), pipe is not a function (2) — e.g. test-zlib-flush-drain-longblock.js
    • write is not a function (2) — e.g. test-zlib-brotli-flush.js
      So zlib.createGzip().pipe(...) / .on('data') / .write() don't work — the returned object isn't wired as a stream.
  2. Unimplemented zlib functions (13 value is not a function) — brotli-heavy, e.g. test-zlib-brotli-16GB.js, test-zlib-brotli-from-brotli.js.
  3. Z_ constants* — undefined.Z_OK (test-zlib-const.js).
  4. Behavioral diffs (2), undefined.length (2).

Priority

The stream-interface gap (cluster 1) is the highest-leverage — it's the foundation most zlib usage builds on, and likely shares a root with the broader stream work. Brotli (cluster 2) is a distinct implementation gap.

Context: full --auto-optimize #800 sweep, perry 0.5.1029. zlib became measurable via #1778.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed defect or regressionparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions