Repository navigation
docs: correct readme, security policy and changelog claims - #625
Merged
Merged
Conversation
Several README statements contradicted the current behaviour: - The introduction said the ecosystem has no streaming support, which the comparison table's own Streaming row contradicts. - The comparison table marked dictionaries unsupported in pako, fflate and node:zlib, which all accept preset deflate dictionaries (and node:zlib zstd dictionaries since Node.js 22.19 and 24.6), and marked node:zlib unavailable in Deno and Bun, which both implement it. - "Bounded memory" did not hold for the LZ4 decompression and brotli dictionary compression streams, which buffer their whole input. A new note names them until the buffering is removed. - The API-mode table did not say that the stream helpers process each chunk synchronously on the calling thread, unlike node:zlib streams, so it now points to the *Async functions or a worker thread when event-loop latency matters. - The *Async section did not say that the input is copied on the calling thread, which costs about 0.6 ms per MB and is why mutating the input after the call is safe. - The LZ4 decompression stream rows omitted maxOutputSize, the Quick Start streaming snippet used an undeclared `response` and did not compile under strict TypeScript, and the Deno section did not mention the local node_modules it needs or the misleading error that a missing --allow-ffi produces. Refs #556 Refs #548 Refs #554 Refs #565 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DRi2Qu5rPjQSDBcR8xmkSS
The brotli table, its chart and the "10-155x faster than node:zlib" takeaway compared comprs at its default quality 6 with node:zlib at its default quality 11. At equal quality the pure-Rust encoder is slower than node:zlib's C encoder: 1.4x on real-world files and up to 7x on small or highly repetitive inputs. The section now says so and recommends zstd when speed matters. The lz4 takeaway about random/incompressible data rested on inputs that repeat every 256 bytes, so it is dropped as well. The remaining tables and charts date from March 2026, before comprs 1.0; the section now says so, names the setup (Apple M2, Node.js 22, each library at its default level) and says that a script will regenerate them. Refs #563 Refs #556 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DRi2Qu5rPjQSDBcR8xmkSS
SECURITY.md still listed only 0.x as supported and promised an update once 1.0 shipped. It now lists each published package: comprs 2.x and comprs-middleware 1.x receive fixes in their latest release, older lines do not, and comprs-wasm32-wasi is no longer published. The 1.1.0 changelog entry claimed zstd multi-threaded compression, but the zstdmt feature only compiles libzstd with thread support: nothing sets the number of workers, so compression runs on one thread. A changeset cannot amend a released entry, so the entry is corrected in place. Refs #556 Refs #561 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DRi2Qu5rPjQSDBcR8xmkSS
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 33 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
*Asyncfunctions copy their input on the calling thread (perf(core): *Async functions copy their input on the main thread #548).Fix
node:zlib. The Dictionary row says what each library supports:zstd, brotli/deflate/deflate/deflate; zstd (Node.js 22.19+, 24.6+). The footnotes render on separate lines.createDecompressStream()/createDecompressTransform()when the input is LZ4. It limits the bounded-memory statement to@derodero24/comprs/streamsand@derodero24/comprs/nodeand links perf(streams): LZ4 decompression and brotli dictionary compression streams buffer the entire input #565.node:zlibstreams use the libuv thread pool. For large inputs where event-loop latency matters, use the*Asyncone-shot functions or a worker thread.createLz4DecompressStream(maxOutputSize?)andcreateLz4DecompressTransform(maxOutputSize?).fetchplus aresponse.bodynull check) and has no unused import.--allow-ffi, the import fails with a misleadingCannot find native bindingerror. Deno also needs"nodeModulesDir": "auto"indeno.jsonor a localnode_modules.bench-brotli.svgchart (the file is deleted; nothing else references it), the "10–155x" takeaway and its Note, and the lz4 "random/incompressible" claim.node:zlib's C encoder, especially for small inputs. Prefer zstd when speed matters."References
dictionaryin Options, and zstd usesdictionaryin ZstdOptions. The zstd option was added in Node.js v22.19.0 / v24.6.0 (zlib: add dictionary support to zstdCompress and zstdDecompress nodejs/node#59240) and is missing from the v22.15–v22.18 and v24.5 docs. That is why the table says 22.19+/24.6+, not 22.15.zlibAPIs, except those that are explicitly synchronous, use the Node.js internal threadpool".SendforBuffer.unsafe impl Send for Buffer {}is atsrc/bindgen_runtime/js_values/buffer.rs:496. The typed-array impl atarraybuffer.rs:476coversUint8Array.Sendis no longer why the async functions copy their input. They copy it so the result stays correct even if the caller mutates, transfers or detaches the input while the operation runs (see perf(core): *Async functions copy their input on the main thread #548).Tests
pnpm run checkand commitlint pass.tsc --strictwith lib dom. The old snippet failed with an undeclaredresponseand an unused import.Follow-ups
Refs #556, #548, #554, #563, #565, #561 (tracking: #535)
Related issue
Refs #556
Refs #548
Refs #554
Refs #563
Refs #565
Part of #535
Breaking changes / Deprecations
N/A
Checklist
pnpm run check)pnpm run typecheck) — N/A, docs only (the Quick Start snippet was type-checked separately withtsc --strict)pnpm test) — N/A, docs onlycargo test) — N/A, docs onlycargo clippy) — N/A, docs onlypnpm run build) — N/A, docs onlycrates/changed) — N/A, docs only,crates/unchanged🤖 Generated with Claude Code
https://claude.ai/code/session_01DRi2Qu5rPjQSDBcR8xmkSS
Generated by Claude Code