buffered-stream

2019-11-10 admin

buffered-stream是什么

什么是buffered-stream,A writable and readable stream with bufferisation

buffered-stream使用教程帮助文档

Build Status

This module create a Stream which implement both the writer and reader API. The content written to the stream is buffered at a defined size and later flushed into the final destination stream. Use the buffered stream to increase writing speed.

Quick example

The example below will buffer the data from i readable stream and send them to a writeable stream as 16 Mo chunks.

buffered = require('buffered-stream');

reader = createStreamReader();
buffer = buffered(4*1024*1024);
writer = createStreamWriter();

reader.pipe(buffer).pipe(writer);

Contributors

  • David Worms: <https://github.com/wdavidw>
    
    

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-78931.html

文章标题:buffered-stream

回到顶部