Converting a Buffer into a ReadableStream in Node.js

后端 未结 8 1218
借酒劲吻你
借酒劲吻你 2020-11-27 16:09

I\'m fairly new to Buffers and ReadableStreams, so maybe this is a stupid question. I have a library that takes as input a ReadableStream, but my input is just

8条回答
  •  爱一瞬间的悲伤
    2020-11-27 16:32

    Node Stream Buffer is obviously designed for use in testing; the inability to avoid a delay makes it a poor choice for production use.

    Gabriel Llamas suggests streamifier in this answer: How to wrap a buffer as a stream2 Readable stream?

提交回复
热议问题