correctErrors(codewordBytes, numDataCodewords) {
			// const numCodewords = codewordBytes.length;
			// First read into an array of ints
			const codewordsInts = new Int32Array(codewordBytes);
			// for (let i = 0; i < numCodewords; i++) {
			//   codewordsInts[i] = codewordBytes[i] & 0xFF;
			// }
			try {
				this.rsDecoder.decode(codewordsInts, codewordBytes.length - numDataCodewords);
			}
			catch (ignored /* ReedSolomonException */) {
				throw new ChecksumException();
			}
			// Copy back into array of bytes -- only need to worry about the bytes that were data
			// We don't care about errors in the error-correction codewords
			for (let i = 0; i < numDataCodewords; i++) {
				codewordBytes[i] = codewordsInts[i];
			}
		}
<p>Given data and error-correction codewords received, possibly corrupted by errors, attempts to
correct the errors in-place using Reed-Solomon error correction.</p>

@param codewordBytes data and error correction codewords
@param numDataCodewords number of codewords that are data bytes
@throws ChecksumException if error correction fails