Below are two programs written in C for simulating encoding and decoding procedures of RS codes, which is the topic of Chapter 4 of the book. These programs implement errors-and-erasures decoding with (1) Berlekamp-Massey (BM) algorithm and (2) Euclidean algorithm for any shortened RS code with arbitrary starting root of its generator polynomial (or starting zero of the code).
In the programs below, the Reed-Somolon code is specified by the finite
field GF(2^m), the code length (length <= 2^m-1), the number of redundant
symbols (length-k), and the initial zero of the code, init_zero.
Encoding and errors-and-erasures decoding of an RS code, BM algorithm:
rs_eedec_bm.c
Encoding and errors-and-erasures decoding of an RS code, Euclidean algorithm:
rs_eedec_euc.c
Errors and erasures correction using the modified Euclidean algorithm.
For more details and an example, see the book.