joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.81k stars 773 forks source link

writeStream.write() support UInt8Array #513

Open sjchristi opened 4 years ago

sjchristi commented 4 years ago

I have a use case where I'd like to unzip a file on disk. I'm using the zlib package:

https://nodejs.org/api/zlib.html#zlib_zlib

to unzip. From the unzip package, it hands me back a buffer of the decoded data which is a UInt8Array. I would like to hand this off directly to the 'write' method of a file created with 'writeStream', however I currently have to re-translate the buffer into base64. Would it be possible to have read/write methods that just support buffers directly so that we don't have to translate to/from base64?

ivanstnsk commented 4 years ago

Hello! Have you found the answer?