Code from http://www.ka9q.net/code/fec/ Used under the LGPL.