Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

stream/fs: support writing ArrayBuffers #6005

Closed
trevnorris opened this issue Aug 6, 2013 · 12 comments
Closed

stream/fs: support writing ArrayBuffers #6005

trevnorris opened this issue Aug 6, 2013 · 12 comments
Assignees
Milestone

Comments

@trevnorris
Copy link

Right now not much will happen if an ArrayBuffer is passed to fs.write. Should be trivial to implement, and will make people happy.

@ghost ghost assigned trevnorris Aug 6, 2013
@trevnorris
Copy link
Author

No one has spoken up wanting this functionality. Since the change is tiny and additive I'm going to punt on getting this in before v0.12 release. If the community speaks out then I'll reconsider.

@YurySolovyov
Copy link

is it for fs.write only, or for other methods too? title says it is also for streams...

@trevnorris
Copy link
Author

The idea is that any input that supports buffers would also support
arraybuffers.

@YurySolovyov
Copy link

if its really that trivial to implement, why not? it will help with some html5 apis in future

@bnoordhuis
Copy link
Member

if its really that trivial to implement, why not?

Lack of time / man power. (High quality) patches are welcome.

@MarcoPolo
Copy link

+1

This would be immensely helpful for writing huge array buffers into files (something I'm doing in cryptic.io ) I wouldn't mind helping implement this if I get some direction.

@bnoordhuis
Copy link
Member

@MarcoPolo If you need technical direction, join #libuv on irc.freenode.org and ping me or Trevor.

@dominictarr
Copy link

what are the pro/cons of ArrayBuffers vs buffers?
will they be able to be passed directly to libuv, or is this just convenience

@trevnorris
Copy link
Author

@dominictarr Buffer is Node's little bit of awesome. It's the default way of passing data in and out of streams. libuv doesn't work directly with either of them. You'd have to rip out the char* first, which can be done with either.

@jasnell
Copy link
Member

jasnell commented May 28, 2015

@trevnorris ... was there ever any progress on this?

@domenic
Copy link

domenic commented May 28, 2015

@jasnell opened nodejs/node#1826 for the more general issue

@jasnell
Copy link
Member

jasnell commented May 28, 2015

Ok, given that I'll close this issue here as it's extremely unlike to land here.

@jasnell jasnell closed this as completed May 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants