public final class ReedSolomonDecoder extends Object
Implements Reed-Solomon decoding, as the name implies.
The algorithm will not be explained here, but the following references were helpful in creating this implementation:
Much credit is due to William Rucklidge since portions of this code are an indirect port of his C++ Reed-Solomon implementation.
Constructor and Description |
---|
ReedSolomonDecoder(GenericGF field) |
Modifier and Type | Method and Description |
---|---|
void |
decode(int[] received,
int twoS)
Decodes given set of received codewords, which include both data and error-correction
codewords.
|
com.google.zxing.common.reedsolomon.GenericGFPoly[] |
runEuclideanAlgorithm(com.google.zxing.common.reedsolomon.GenericGFPoly a,
com.google.zxing.common.reedsolomon.GenericGFPoly b,
int R) |
public ReedSolomonDecoder(GenericGF field)
public void decode(int[] received, int twoS) throws ReedSolomonException
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.
received
- data and error-correction codewordstwoS
- number of error-correction codewords availableReedSolomonException
- if decoding fails for any reasonpublic com.google.zxing.common.reedsolomon.GenericGFPoly[] runEuclideanAlgorithm(com.google.zxing.common.reedsolomon.GenericGFPoly a, com.google.zxing.common.reedsolomon.GenericGFPoly b, int R) throws ReedSolomonException
ReedSolomonException
Copyright © 2007-2014. All Rights Reserved.