【文件属性】:
文件名称:fixed-size-stream-splitter:将流分成许多固定大小的流
文件大小:5KB
文件格式:ZIP
更新时间:2021-05-07 22:51:03
JavaScript
固定大小的分流器
将流分成许多固定大小的流
与类似的模块(例如,此程序包不会将每个固定大小的块缓冲到内存中。
固定大小的流拆分器可能更适合于可能无法轻松装入内存的非常大的块。
例子
var splitter = require ( 'fixed-size-stream-splitter' )
var concat = require ( 'concat-stream' )
process . stdin . pipe ( splitter ( 5 , function ( stream ) {
stream . pipe ( concat ( function ( body ) {
console . log ( body . toString ( ) )
} ) )
} ) )
输出
$ echo -n abcdefghijklmnop | node split.js
【文件预览】:
fixed-size-stream-splitter-master
----readme.markdown(1KB)
----package.json(862B)
----LICENSE(1KB)
----index.js(1KB)
----example()
--------split.js(202B)
----test()
--------split.js(525B)
--------boundary.js(606B)
--------chunks.js(612B)
--------offset.js(541B)