8000
Skip to content

Feat: Add WHATWG TransformStream adapters and detectZxc utility - #211

Merged
hellobertrand merged 2 commits into
mainfrom
feat/wasm-io-wrapper
May 6, 2026
Merged

Feat: Add WHATWG TransformStream adapters and detectZxc utility#211
hellobertrand merged 2 commits into
mainfrom
feat/wasm-io-wrapper

Conversation

@hellobertrand
@hellobertrand hellobertrand commented May 5, 2026
Copy link
Copy Markdown
Owner

Integrates zxc compression and decompression with the WHATWG Streams API via TransformStream, enabling use in modern JavaScript streaming pipelines (e.g., fetch().body.pipeThrough()). This enhances compatibility for web, Deno, Bun, and Node.js environments, and facilitates use cases like OCI layer streaming.

Additionally, introduces a pure JavaScript detectZxc function for lightweight content sniffing, which operates without WASM module initialization.

@codecov
codecov Bot commented May 5, 2026
8000
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread wrappers/wasm/test.mjs Fixed
Comment thread wrappers/wasm/zxc_wasm.js Dismissed
Comment thread wrappers/wasm/zxc_wasm.js Dismissed
Integrates ZXC compression and decompression with the WHATWG Streams API via `TransformStream`, enabling use in modern JavaScript streaming pipelines (e.g., `fetch().body.pipeThrough()`). This enhances compatibility for web, Deno, Bun, and Node.js environments, and facilitates use cases like OCI layer streaming.

Additionally, introduces a pure JavaScript `detectZxc` function for lightweight content sniffing, which operates without WASM module initialization.
Enhances the test for truncated ZXC frames in the WASM decompress `TransformStream` to explicitly verify that an error is thrown and that its `code` property is `ZXC_TRUNCATED`. This provides more precise error validation for streaming decompression.

Additionally, removes a direct compression/decompression example from the `zxc_wasm.js` JSDoc, aligning with the focus on streaming APIs.
@hellobertrand
hellobertrand force-pushed the feat/wasm-io-wrapper branch from 1a543b3 to a2af04f Compare May 6, 2026 10:50
@hellobertrand
hellobertrand marked this pull request as ready for review May 6, 2026 10:50
Comment thread wrappers/wasm/test.mjs Dismissed
@hellobertrand
hellobertrand merged commit 2a94768 into main May 6, 2026
73 checks passed
@hellobertrand
hellobertrand deleted the feat/wasm-io-wrapper branch May 6, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0