GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — zlib: fix abort with decodeStrings: false by Cherry · Pull Request #66359 · nodejs/node

Conversation

@Cherry

@Cherry Cherry commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Passing decodeStrings: false to a zlib stream or async convenience method aborts the process as soon as a string is written:

require('node:zlib').createGzip({ decodeStrings: false }).end('x');
// Assertion failed: Buffer::HasInstance(args[1])

zlib passes its options through to Transform, so decodeStrings: false lets strings reach the native handle, which only accepts Buffers. ZlibBase already resets encoding and objectMode for the same reason, so this adds decodeStrings to that list. fs.WriteStream forces it the same way so this seemed okay, but let me know if not.

Found while checking how options reach zstdCompress() for #66358.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Cherry
zlib: fix abort with decodeStrings: false
eb735f8
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <[email protected]>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib module and its compression dependencies. labels Sep 27, 2026
@codecov

codecov Bot commented Sep 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.35%. Comparing base (37d5c80) to head (eb735f8).
⚠️ Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66359      +/-   ##
==========================================
- Coverage   90.36%   90.35%   -0.01%     
==========================================
  Files         792      792              
  Lines      275386   275388       +2     
  Branches    52775    52773       -2     
==========================================
- Hits       248839   248819      -20     
- Misses      16975    16981       +6     
- Partials     9572     9588      +16     
Files with missing lines Coverage Δ
lib/zlib.js 98.42% <100.00%> (+<0.01%) ⬆️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax approved these changes Sep 28, 2026
View reviewed changes
@addaleax addaleax added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Sep 28, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 28, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78028/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lpinca
lpinca approved these changes Sep 28, 2026
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78068/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@H4ad H4ad added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 29, 2026
@nodejs-github-bot
nodejs-github-bot merged commit b42c0cc into nodejs:main Sep 29, 2026
87 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Landed in b42c0cc

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 29, 2026
@robobun robobun mentioned this pull request Sep 30, 2026
node:zlib: zstdCompress keeps an explicit pledgedSrcSize and pledges only an exact input size oven-sh/bun#44283
Closed
aduh95 pushed a commit that referenced this pull request Oct 3, 2026
@Cherry @aduh95
zlib: fix abort with decodeStrings: false
bb3d33e
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <[email protected]>
PR-URL: #66359
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
2026-10-07, Version 26.11.0 (Current) #66546
Merged
aduh95 pushed a commit that referenced this pull request Oct 23, 2026
@Cherry @aduh95
zlib: fix abort with decodeStrings: false
d084008
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <[email protected]>
PR-URL: #66359
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
This was referenced Oct 27, 2026
node:zlib: zstd pledgedSrcSize and dictionary follow Node v26.12.1 oven-sh/bun#47027
Closed
node:zlib: force decodeStrings back to true in ZlibBase oven-sh/bun#47140
Open
aduh95 pushed a commit that referenced this pull request Oct 28, 2026
@Cherry @aduh95
zlib: fix abort with decodeStrings: false
90747d4
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <[email protected]>
PR-URL: #66359
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@leapmux-renovate leapmux-renovate Bot mentioned this pull request Nov 1, 2026
chore(deps): Update Node.js to v26 leapmux/leapmux#578
Merged
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@Cherry @aduh95
zlib: fix abort with decodeStrings: false
6ff0abd
Passing decodeStrings: false to a zlib stream, or to an async
convenience method, let strings reach the native handle, which
aborts the process on its Buffer check. Force decodeStrings back to
true, as is already done for encoding and objectMode.

Signed-off-by: James Ross <[email protected]>
PR-URL: #66359
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
@robobun robobun mentioned this pull request Nov 21, 2026
node:zlib: refuse reset() of a gzip member that is open and has given output oven-sh/bun#47364
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@addaleax addaleax addaleax approved these changes
@lpinca lpinca lpinca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. zlib Issues and PRs related to the zlib module and its compression dependencies.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@Cherry @nodejs-github-bot @addaleax @lpinca @H4ad
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.