louismullie / erc-js

A Javascript implementation of Reed-Solomon error correcting codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

##reed-solomon

A Javascript implementation of Reed-Solomon error correcting codes. This implementation uses Forney's algorithm to determine the error values.

###Classes

ReedSolomon

      Public-facing interface providing encode/decode functionality

ReedSolomon.Codec

      Implements the Reed-Solomon error correction algorithm

ReedSolomon.GaloisField

      Implements a Galois field GF(p^n) over p = 2

ReedSolomon.Utils

      Implements string and array manipulation methods

###Configuration

The ReedSolomon constructor accepts the length of a codeword n as a parameter. The code will have error correcting power (n-k)/2, where k is the message length.

###Usage

// n is the length of a codeword
var rs = new ReedSolomon(n);
var enc = rs.encode('hello world');
var msg = rs.decode(enc);

###Dependencies

Depends on class.js (included in this repository under the lib/ directory).

###License

This code is licensed under the GPL v3.

About

A Javascript implementation of Reed-Solomon error correcting codes.

License:Other


Languages

Language:JavaScript 94.0%Language:CSS 6.0%