Encodes an ASCII file using a Reed-Solomon coder. The input file is defined by in and the result is written to the output file out. The type of coding to use is determined by whether the input file is 7- or 8-bit. If the input file is 7-bit, the default coding is [127,117]. while the default coding for an 8-bit file is a [255, 235]. This allows for 5 or 10 error characters in 127 or 255 symbols to be corrected respectively. The number of errors that can be corrected can be overridden by the variable t.
If the file is not an integer multiple of the message size (127 or 255) in length, then the file is padded with the EOT (ASCII character 4) characters before coding. Whether these characters are written to the output is defined by the pad variable. Valid values for pad are "pad" (the default) and "nopad", which write or not the padding respectively.
See also: rsdecof.
Package: communications