Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reed-solomon

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reed-solomon

Reed-Solomon erasure coding in pure Javascript

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by83.33%
Maintainers
1
Weekly downloads
 
Created
Source

reed-solomon

Reed-Solomon erasure coding in pure Javascript. A Javascript port of the JavaReedSolomon library released by Backblaze. Special thanks to Backblaze. For an introduction to erasure coding, see the post by Brian Beach on the Backblaze blog as well as his video.

License

reed-solomon is licensed under the MIT License, which means that you can use it in your own projects for free. You can even use it in commercial projects.

Installation

npm install reed-solomon

Usage

Encoding

var ReedSolomon = require('reed-solomon');
var dataShards = 6;
var parityShards = 3;
var shardSize = 1024;
var shards = [
  // Data shards (containing user data):
  new Buffer(shardSize),
  new Buffer(shardSize),
  new Buffer(shardSize),
  new Buffer(shardSize),
  new Buffer(shardSize),
  new Buffer(shardSize),
  // Parity shards (zero-filled or not containing any parity data):
  new Buffer(shardSize),
  new Buffer(shardSize),
  new Buffer(shardSize)
];
var rs = new ReedSolomon(dataShards, parityShards);
rs.encodeParity(shards, 0, shardSize);
// Parity shards will now contain parity data.

Keywords

FAQs

Package last updated on 08 Jul 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc