Skip to content

Feature request: automatic string decoding for writable streams #7315

@mscdex

Description

@mscdex
  • Version: all
  • Platform: n/a
  • Subsystem: stream

It would be nice if Writable streams had a configuration option to decode buffers to strings (using a StringDecoder instance). This is handy for example when writing a Transform stream that takes utf8 input.

Currently you have to set up your own StringDecoder instance and write the data through that first, which is kind of annoying. For non-multibyte encodings this isn't necessary though since you can just chunk.toString() inside your _write()/_transform() handler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.streamIssues and PRs related to the stream subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions