@akiroz/size-chunker-stream
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

size-chunker-stream

A NodeJS transform stream for chunking raw data into constant-size chunks. Useful for consuming raw media streams where chunk size = 1 frame.

API

import SizeChunker from "@akiroz/size-chunker-stream";

const chunker = new SizeChunker({ chunkSize: 640 * 480 * 3 });

process.stdin.pipe(chunker);

chunker.on("data", (frame) => {
    // Do stuff with frame
});

Readme

Keywords

none

Package Sidebar

Install

npm i @akiroz/size-chunker-stream

Weekly Downloads

47

Version

0.0.1

License

MIT

Unpacked Size

5.82 kB

Total Files

12

Last publish

Collaborators

  • akiroz