Skip to content

buffer: implement blob.textStream()#64036

Open
KhafraDev wants to merge 1 commit into
nodejs:mainfrom
KhafraDev:blob-textstream
Open

buffer: implement blob.textStream()#64036
KhafraDev wants to merge 1 commit into
nodejs:mainfrom
KhafraDev:blob-textstream

Conversation

@KhafraDev

@KhafraDev KhafraDev commented Jun 20, 2026

Copy link
Copy Markdown
Member

Implements Blob.prototype.textStream()

refs: w3c/FileAPI@cd1d1da
refs: nodejs/undici@0d6ecc5

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/web-standards

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jun 20, 2026
Signed-off-by: Matthew Aitken <maitken033380023@gmail.com>
@Renegade334 Renegade334 added semver-minor PRs that contain new features and should be released in the next minor version. web-standards Issues and PRs related to Web APIs labels Jun 21, 2026
Comment thread doc/api/buffer.md

Returns a new `ReadableStream` that allows the content of the `Blob` to be read
as a stream of UTF-8 decoded strings. It is equivalent to piping
[`blob.stream()`][] through a [`TextDecoderStream`][] set up with UTF-8.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "set up with" matches the spec operation, but sounds a bit unnatural here.

Suggested change
[`blob.stream()`][] through a [`TextDecoderStream`][] set up with UTF-8.
[`blob.stream()`][] through a UTF-8 [`TextDecoderStream`][].

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the one time the CI passes first time...

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I'm good with the implementation, but I think it might be possible to optimize this a lot by avoiding one stream. I'm not sure we should be doing this right now.

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 21, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version. web-standards Issues and PRs related to Web APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants