🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

rabin-native

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rabin-native

Native bindings for rabin-cdc

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 01 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts