1.0.1 • Published 4 years ago

rabin-native v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

rabin-native

Native bindings for rabin-cdc

npm install rabin-native

Usage

const Rabin = require('rabin-native')

const r = new Rabin()

const chunks = r.push(Buffer.from('some chunk of data'))

for (let i = 0; i < chunks; i++) {
  console.log('chunk length: ' + r.chunks[i])
}

API

rabin = new Rabin()

Makes a new rabin instance

chunkCount = rabin.push(buffer)

Push data to the chunker. Returns the amount of chunks found.

rabin.chunks

A Uint32Array containing the length of the chunks found.

chunks = rabin.finalise()

Finalises the chunker. Call this when your input stream is done. Returns the remaining chunk count.

License

MIT

1.0.1

4 years ago

1.0.0

4 years ago

0.0.1

5 years ago

0.0.0

5 years ago