A Javascript implementation of Reed-Solomon error correcting codes. This implementation uses Forney's algorithm to determine the error values.
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
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.
// n is the length of a codeword
var rs = new ReedSolomon(n);
var enc = rs.encode('hello world');
var msg = rs.decode(enc);Depends on class.js (included in this repository under the lib/ directory).
This code is licensed under the GPL v3.