Skip to content

docs: correct readme, security policy and changelog claims - #625

Merged
derodero24 merged 3 commits into
developfrom
docs/issue-556-docs-accuracy
Oct 4, 2026
Merged

derodero24 merged 3 commits into
developfrom
docs/issue-556-docs-accuracy

Conversation

@derodero24

Copy link
Copy Markdown
Owner

Summary

Problem

Fix

  • README claims:
    • Dropped "no streaming support" from the intro.
    • Comparison table: node:zlib Deno/Bun is ✅‡, with a footnote that Deno 2 and Bun implement 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.
    • The "bounded memory" bullet names the two streams that buffer their whole input. A new Notes entry, "Streams that buffer their input", lists them, including the auto-detecting createDecompressStream() / createDecompressTransform() when the input is LZ4. It limits the bounded-memory statement to @derodero24/comprs/streams and @derodero24/comprs/node and links perf(streams): LZ4 decompression and brotli dictionary compression streams buffer the entire input #565.
    • "Choosing an API mode" has a new paragraph. The Web Streams and Node.js Transforms process each chunk synchronously on the calling thread, while node:zlib streams use the libuv thread pool. For large inputs where event-loop latency matters, use the *Async one-shot functions or a worker thread.
    • The Async section has a new paragraph. The input (data, dictionary or training samples) is copied on the calling thread and no reference to it is kept, so changing or transferring the input once the call has returned is safe. The copy blocks the event loop for about 0.6 ms per MB. For very large inputs, use a worker thread.
    • The LZ4 rows now read createLz4DecompressStream(maxOutputSize?) and createLz4DecompressTransform(maxOutputSize?).
    • The Quick Start streaming snippet is self-contained (fetch plus a response.body null check) and has no unused import.
    • Deno section: without --allow-ffi, the import fails with a misleading Cannot find native binding error. Deno also needs "nodeModulesDir": "auto" in deno.json or a local node_modules.
  • README benchmarks:
    • Removed the brotli table, the bench-brotli.svg chart (the file is deleted; nothing else references it), the "10–155x" takeaway and its Note, and the lz4 "random/incompressible" claim.
    • The section now says the tables and charts were measured in March 2026, before comprs 1.0, on an Apple M2 with Node.js 22, with each library at its default level. It also says a script is regenerating them (docs: README, SECURITY.md and CONTRIBUTING.md contradict current behaviour #556).
    • Added: "comprs uses a pure-Rust brotli encoder: at equal quality, it is slower than node:zlib's C encoder, especially for small inputs. Prefer zstd when speed matters."
  • SECURITY.md has one row per package and version line:
    • comprs: 2.x ✅, < 2.0 ❌.
    • comprs-middleware: 1.x ✅, < 1.0 ❌.
    • comprs-wasm32-wasi: ❌, no longer published.
    • Fixes ship in the latest 2.x release of comprs and the latest 1.x release of comprs-middleware. The "Once version 1.0" sentence is gone.
  • CHANGELOG.md 1.1.0: the zstdmt claim now carries an in-place "(corrected: …)" note. libzstd is built with multi-threading support, but nothing turns on its worker threads, so zstd compression runs on one thread (chore(zstd): the zstdmt feature is compiled in but never enabled #561). A changeset cannot amend a released entry.
  • CONTRIBUTING.md is not changed here: build: declare and enforce the minimum supported Rust version #612 already replaced the outdated pnpm requirement.

References

Tests

  • Docs only, no changeset.
  • pnpm run check and commitlint pass.
  • The Quick Start snippet type-checks under tsc --strict with lib dom. The old snippet failed with an undeclared response and an unused import.
  • Every changed anchor and link was checked.

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

  • Lint passes (pnpm run check)
  • TypeScript type-check passes (pnpm run typecheck) — N/A, docs only (the Quick Start snippet was type-checked separately with tsc --strict)
  • JS tests pass (pnpm test) — N/A, docs only
  • Rust tests pass (cargo test) — N/A, docs only
  • Clippy passes (cargo clippy) — N/A, docs only
  • Build succeeds (pnpm run build) — N/A, docs only
  • Changeset included (if crates/ changed) — N/A, docs only, crates/ unchanged
  • Benchmarks run for performance-sensitive changes — N/A, no code change

🤖 Generated with Claude Code

https://claude.ai/code/session_01DRi2Qu5rPjQSDBcR8xmkSS


Generated by Claude Code

claude added 3 commits October 4, 2026 02:36
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
@coderabbitai

coderabbitai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de12ff56-1a31-42de-95f5-dbd6098129d6
📥 Commits

Reviewing files that changed from the base of the PR and between a1a2d6b and d5ac099.

⛔ Files ignored due to path filters (1)
  • .github/assets/bench-brotli.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • CHANGELOG.md
  • README.md
  • SECURITY.md
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@derodero24
derodero24 merged commit 600c422 into develop Oct 4, 2026
2 checks passed
@derodero24
derodero24 deleted the docs/issue-556-docs-accuracy branch October 4, 2026 02:38
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