Buffer queue for Node.js streams that accumulates Buffer chunks and drains them in fixed-size pieces. Version 1.0.0 (stable, last release 2015). Optimized to be faster than repeatedly calling Buffer.concat on each chunk. Provides Store class with push, shift, empty, length, and drain methods. Minimal API, no dependencies. Useful for throttling or batching binary data in streams. No updates since 2015; consider alternatives like bl or native Buffer.concat.
npm install buffer-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: create store, push buffers, shift a fixed number of bytes, check length, drain, and empty.
Switch to bl or use Buffer.concat after collecting chunks.
Always check for null: const chunk = store.shift(n); if (chunk) { ... }Use only as shown in documentation: push, shift, length, drain, empty.
Use default import or require('buffer-queue') directly: const Store = require('buffer-queue'); const store = new Store();Ensure you call new Store() before using shift.
No dependency data recorded yet.