public boolean correct ( GrowQueue_I8 input , GrowQueue_I8 ecc ) { computeSyndromes ( input , ecc , syndromes ) ; findErrorLocatorPolynomialBM ( syndromes , errorLocatorPoly ) ; if ( ! findErrorLocations_BruteForce ( errorLocatorPoly , input . size + ecc . size , errorLocations ) ) return false ; correctErrors ( input , input . size + ecc . size , syndromes , errorLocatorPoly , errorLocations ) ; return true ; }
Decodes the message and performs any necessary error correction