Skip to content

yotamofek/pivot-buffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rotating buffer for node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published