Summary
Most of Perry's node:zlib surface has been filled in, but the Node 22+ Zstd APIs are currently only exposed as shapes. The ZstdCompress / ZstdDecompress classes and createZstd* factory names exist for typeof checks, but there is no runtime codec implementation or native-table dispatch for Zstd compression/decompression.
Evidence
test-files/test_parity_zlib.ts still probes zlib.ZstdCompress, zlib.ZstdDecompress, createZstdCompress, createZstdDecompress, zstdCompressSync, zstdDecompressSync, zstdCompress, and zstdDecompress.
crates/perry-api-manifest/src/entries.rs registers class("zlib", "ZstdCompress"), class("zlib", "ZstdDecompress"), zlib_stream_factory("createZstdCompress"), and zlib_stream_factory("createZstdDecompress"), but there are no zstdCompress, zstdDecompress, zstdCompressSync, or zstdDecompressSync manifest entries.
crates/perry-runtime/src/object/native_module.rs lists ZstdCompress, ZstdDecompress, createZstdCompress, and createZstdDecompress in the callable export whitelist, which makes property reads look function-shaped.
crates/perry-codegen/src/lower_call/native_table/media.rs has runtime rows for createGzip, createGunzip, createDeflate, createInflate, raw variants, createUnzip, and Brotli factories, but no createZstdCompress or createZstdDecompress rows.
crates/perry-stdlib/src/zlib.rs has stream codecs for gzip/gunzip/deflate/inflate/raw/unzip/Brotli, but no Codec::Zstd*, no js_zlib_create_zstd_*, and no one-shot Zstd functions.
- Existing merged PRs have covered zlib constructor exports, constants, stream close/property shape, and stream instances, but not Zstd behavior.
I did not run a fresh local parity command because this checkout does not have a target/release/perry binary; this issue is based on committed parity metadata and source inspection.
Non-duplicates checked
Searches for node:zlib, zlib Zstd createZstd, zlib zstd, and PRs for zlib zstd found merged zlib work (#1927, #2257, #2260, #2265, #955), but no open or closed issue tracking actual Zstd codec behavior.
Expected behavior
Add Node-compatible Zstd support for the modern zlib surface:
zlib.zstdCompress(buffer[, options], callback)
zlib.zstdCompressSync(buffer[, options])
zlib.zstdDecompress(buffer[, options], callback)
zlib.zstdDecompressSync(buffer[, options])
zlib.createZstdCompress([options]) and zlib.createZstdDecompress([options]) as real transform-stream handles
ZstdCompress / ZstdDecompress constructors that match the surrounding zlib class export behavior
A first implementation can follow the existing zlib stream-handle pattern and add deterministic round-trip parity tests similar to the gzip/raw/Brotli suites.
Summary
Most of Perry's
node:zlibsurface has been filled in, but the Node 22+ Zstd APIs are currently only exposed as shapes. TheZstdCompress/ZstdDecompressclasses andcreateZstd*factory names exist fortypeofchecks, but there is no runtime codec implementation or native-table dispatch for Zstd compression/decompression.Evidence
test-files/test_parity_zlib.tsstill probeszlib.ZstdCompress,zlib.ZstdDecompress,createZstdCompress,createZstdDecompress,zstdCompressSync,zstdDecompressSync,zstdCompress, andzstdDecompress.crates/perry-api-manifest/src/entries.rsregistersclass("zlib", "ZstdCompress"),class("zlib", "ZstdDecompress"),zlib_stream_factory("createZstdCompress"), andzlib_stream_factory("createZstdDecompress"), but there are nozstdCompress,zstdDecompress,zstdCompressSync, orzstdDecompressSyncmanifest entries.crates/perry-runtime/src/object/native_module.rslistsZstdCompress,ZstdDecompress,createZstdCompress, andcreateZstdDecompressin the callable export whitelist, which makes property reads look function-shaped.crates/perry-codegen/src/lower_call/native_table/media.rshas runtime rows forcreateGzip,createGunzip,createDeflate,createInflate, raw variants,createUnzip, and Brotli factories, but nocreateZstdCompressorcreateZstdDecompressrows.crates/perry-stdlib/src/zlib.rshas stream codecs for gzip/gunzip/deflate/inflate/raw/unzip/Brotli, but noCodec::Zstd*, nojs_zlib_create_zstd_*, and no one-shot Zstd functions.I did not run a fresh local parity command because this checkout does not have a
target/release/perrybinary; this issue is based on committed parity metadata and source inspection.Non-duplicates checked
Searches for
node:zlib,zlib Zstd createZstd,zlib zstd, and PRs forzlib zstdfound merged zlib work (#1927, #2257, #2260, #2265, #955), but no open or closed issue tracking actual Zstd codec behavior.Expected behavior
Add Node-compatible Zstd support for the modern zlib surface:
zlib.zstdCompress(buffer[, options], callback)zlib.zstdCompressSync(buffer[, options])zlib.zstdDecompress(buffer[, options], callback)zlib.zstdDecompressSync(buffer[, options])zlib.createZstdCompress([options])andzlib.createZstdDecompress([options])as real transform-stream handlesZstdCompress/ZstdDecompressconstructors that match the surrounding zlib class export behaviorA first implementation can follow the existing zlib stream-handle pattern and add deterministic round-trip parity tests similar to the gzip/raw/Brotli suites.