0.1.0 • Published 8 years ago

pivot-buffer v0.1.0

Weekly downloads
6
License
ISC
Repository
github
Last release
8 years ago

pivot-buffer

Rotating data buffer for Node.js

Build Status

Kind: global class

new PivotBuffer(size)

ParamTypeDescription
sizenumberThe 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

ParamTypeDescription
bufferBufferthe buffer to append