pinojs / sonic-boom

Extremely fast utf8 only stream implementation
MIT License
261 stars 41 forks source link

question: similar module, but for handling binary data streams? #173

Open AVVS opened 1 year ago

AVVS commented 1 year ago

Love the module <3

Recently was playing around and tried to get this to write compressed files, which, obviously, did not work as utf8 input is expected. Would anyone be able to point me in the right direction? Currently the best thing i have is a simple pipeline of zlib.create[compressor of choice] -> fs.createWriteStream, but it doesn't perform any sophisticated fs error handling, data buffering for more efficient writes, etc.

In case there is nothing better than the naive approach mentioned - would it be worth spending time to try and add support for binary data being written here or is it out of scope of the project?