Skip to content

adityakaria/Luby-Transform-Code

Repository files navigation

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.

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 lt_codes.py. However:

  • core.py contains the Symbol class, constants and functions that are used in both encoding and decoding.
  • distributions.py contains the two functions that generate degrees based on the ideal soliton and robust soliton distributions
  • encoder.py contains the encoding algorithm
  • decoder.py contains the decoding algorithm
  • md5_checker.sh calls lt_codes.py and 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.

Benchmarks

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 :

Size (MB) Blocks Symbols Encoding Decoding
Time (s) Speed (MB/s) Time (s) Speed (MB/s)
1 16 24 0.00 - 0.00 -
100 1600 2400 0.21 476.1 0.31 322.5
1200 19200 28800 3.86 310.8 39.82 30.1
2000 32000 48000 6.44 310.5 104.10 19.2
3600 57600 86400 23.14 155.5 426.36 8.4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published