ReedSolomonCodec

Reed-Solomon codec for 8-bit characters. * Based on libfec by Phil Karn, KA9Q.

class ReedSolomonCodec {
int symbolSize;
int blockSize;
int padding;
int firstRoot;
int primitive;
int numRoots;
int iPrimitive;
int[] alphaTo;
int[] _indexOf;
int[] generatorPoly;
}

Constructors

this
this(int symbolSize_, int gfPoly_, int firstRoot_, int primitive_, int numRoots_, int padding_)

Creates a new reed solomon instance.

Members

Functions

encode
void encode(int[] data, int[] parity)

Encodes data and writes result back into parity array.

modNn
int modNn(int x)

Computes x % GF_SIZE, where GF_SIZE is 2**GF_BITS - 1, without a slow divide.

Meta