Fountain Code: Efficient Python Implementation of LT Codes
This project is the implementation in Python of the iterative encoding and iterative decoding algorithms of the LT Codes, an error correction code based on the principles of Fountain Codes. I have written a whole article on LT Codes and this snippet that you can find here : franpapers.com
The encoder and decoder are optimized to handle big transfers for files between 1MB to 1GB at high speed.
How to use it
Usage (python 3.x):
python lt_codes.py filename [-h] [-r REDUNDANCY] [--systematic] [--verbose] [--x86]
An example describing how to use the implementation is in
core.pycontains the Symbol class, constants and functions that are used in both encoding and decoding.
distributions.pycontains the two functions that generate degrees based on the ideal soliton and robust soliton distributions
encoder.pycontains the encoding algorithm
decoder.pycontains the decoding algorithm
lt_codes.pyand then compare the integrity of the original file with the newly created file. The integrity check is made with
md5sum.exe, remove the ".exe" if you work on Unix.
The time consumed by the encoding and decoding process is completely related to the size of the file to encode and the wanted redundancy. I have made some measure on an Intel i5 @ 2.30GHz with a 1.5 redundancy :
|Time (s)||Speed (MB/s)||Time (s)||Speed (MB/s)|