pivot-buffer

0.1.0 • Public • Published

pivot-buffer

Rotating data buffer for Node.js

Build Status

Kind: global class

new PivotBuffer(size)

Param Type Description
size number The fixed size of the buffer, beyond which point data will be rotated.

pivotBuffer.value ⇒ Buffer

The underlying buffer. Truncated to size of current data (may be smaller than size specified in constructor).

Kind: instance property of PivotBuffer

pivotBuffer.length ⇒ number

Length of current buffer, between the range of 0 to buffer size, inclusive.

Kind: instance property of PivotBuffer

pivotBuffer.append(buffer)

Append a node buffer to the current buffer, rotating the current data if necessary. If buffer to append is bigger than the cap of the pivot buffer, only the last portion of it will be written.

Kind: instance method of PivotBuffer

Param Type Description
buffer Buffer the buffer to append

Readme

Keywords

Package Sidebar

Install

npm i pivot-buffer

Weekly Downloads

3

Version

0.1.0

License

ISC

Last publish

Collaborators

  • yotamofek