Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for a case with a binary safe string reading #180

Closed
wants to merge 1 commit into from
Closed

Update docs for a case with a binary safe string reading #180

wants to merge 1 commit into from

Conversation

TriAnMan
Copy link

readable.setEncoding(null) - may be the most preferable way to proxy a binary data without any encoding/decoding overhead

`readable.setEncoding(null)` - may be the most preferable way to proxy a binary data without any encoding/decoding overhead
@calvinmetcalf
Copy link
Contributor

wouldn't just using object mode be the preferable way?

@TriAnMan
Copy link
Author

We had an issue with it.
We have an HTTP server that outs data in chunks of 8192 bytes length (i.e. long json). The content of data is utf8 encoded. If the borders of chunk breaks an utf8 sequence in two parts then each part become converted into an replacement character.
With readable.setEncoding(null) - everything is fine and we can combine chunks into a valid data string.

@calvinmetcalf
Copy link
Contributor

fryi this is just a copy of the docs, the file you want to update is https://github.com/nodejs/node/blob/master/doc/api/stream.markdown

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