Reed-Solomon encoding and decoding implementation example in Java

5.4k views Asked by At

I need to encode and decode some text using Reed-Solomon error correction codes. Implementation should be in Java.

I have gone through Sean Owen's implementation classes but was not able to construct these classes with a working example.

Can somebody please post an working example of Reed-Solomon error correction codes or any reference links.

1

There are 1 answers

1
dodgy_coder On

this is a bit late, but there is a fully working example in Java on github here:

https://github.com/alexbeutel/Error-Correcting-Codes/tree/master/src

It features the following classes:

  • Decoder.java <== R-S Decoder class
  • Encoder.java <== R-S Encoder class
  • ErrorCodesMain.java <== Fully working example
  • GF257.java <== Galois Fields(257) class
  • GF28.java <== Galois Fields(2^8) class

To build the project from the command line:

javac ErrorCodesMain.java Decoder.java Encoder.java GF257.java GF28.java

To run it:

java ErrorCodesMain

Here is the program's output:

# of Generators of GF(2^8): 128
# of Generators of GF(257): 128
Generator: 206
Erasures: 38, 1, 7, 15, 28, 16, 29, 28, 7, 8, 

OUTPUT FROM O(nk) IN GF(2^8): Hello, my name is Alex Beutel.
FFT OUTPUT DECODED: Hello, my name is Alex Beutel.
OUTPUT FROM O(nk) IN GF(257): Hello, my name is Alex Beutel.