The Reed-Solomon Code is an algebraic code belonging to the class of
BCH (Bose-Chaudry-Hocquehen) multiple burst correcting cyclic codes.
The Reed Solomon code operates on bytes of fixed length.
Given m parity bytes, a Reed-Solomon code can correct up to m byte
errors in known positions (erasures), or detect and correct up to m/2
byte errors in unknown positions.
This is an implementation of a Reed-Solomon code with 8 bit bytes, and
a configurable number of parity bytes. The maximum sequence length
(codeword) that can be generated is 255 bytes, including parity bytes.
In practice, shorter sequences are used.
The more general error-location algorithm is the Berlekamp-Massey
algorithm, which will locate up to four errors, by iteratively solving
for the error-locator polynomial. The Modified Berlekamp Massey
algorithm takes as initial conditions any known suspicious bytes
(erasure flags) which you may have (such as might be flagged by a
laser demodulator, or deduced from a failure in a cross-interleaved
block code row or column).
Once the location of errors is known, error correction is done using
the error-evaluator polynomial.