decode

fun decode(received: IntArray, twoS: Int)

Decodes given set of received codewords, which include both data and error-correction codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, in the input.

Parameters

received

data and error-correction codewords

twoS

number of error-correction codewords available

Throws

if decoding fails for any reason