The basic idea of FEC is to add redundancy to data transmission. For the
cost of increasing marginally the transmission rate, the redundant information
can be used at the receiver to reconstruct lost or damaged data.
The algorithm works as follows: At the sender side a so-called FEC encoder
adds k redundant packets to each block of n original packets. The redundant
packets can be obtained by a block-code (e.g. Reed-Solomon code) or in
the simplest case by X-OR-ing the original packets. All n original and
k redundant packets are transmitted to the receiver. Here a FEC decoder
is able to fully reconstruct the original packets as long as any n packets
are correctly received.