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.
Opening this PR but closing it too. This is just meant for posterity.
I was trying to figure out how much was required to implement binary input/output, which this PR does (without the tests).
I think it's a little too much logic.
Binary input/output is useful in some cases, such as compression, cryptography (including hashes and randomness), some network protocols, and some memory- or bandwidth-sensitive use cases.
However, users can work around this by passing
fs.createWriteStream()
to thestdout
option, orfs.createReadStream()
to thestdin
option. Note: they first need to wait for thespawn
event.Based on this, I will close this PR but leave it there. Please let me know if you come to different conclusions from that experiment.