1 /* 2 * reedsolomon.c: Reed-Solomon (255,239) en-,decoding 3 * written by Alex Papazoglou 4 */ 5 6 /* 7 * Decode a 255-byte block in place. Returns number of corrected errors, 8 * if fix is set, or -1 in case of unfixed errors. 9 */ 10 int rs_decode_block (unsigned char *blk, int fix); 11 12 /* 13 * Encode a block. Only the trailing 16 parity bytes are computed in 14 * a buffer which caller preallocates. 15 */ 16 void rs_encode_block (unsigned char *parity, unsigned char *src, int count); 17