rsthe rs control structure
datadata field of a given type
parreceived parity data field
lendata length
ssyndrome data field (if NULL, syndrome is calculated)
no_erasnumber of erasures
eras_posposition of erasures, can be NULL
invmskinvert data mask (will be xored on data, not on parity!)
corrbuffer to store correction bitmask on eras_pos
The syndrome and parity uses a uint16_t data type to enable symbol size > 8. The calling code must take care of decoding of the syndrome result and the received parity before calling this code.