{ "info": { "author": "Anson Rosenthal", "author_email": "anson.rosenthal@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "LT-code\n=======\n\nThis is an implementation of a Luby Transform code in Python, consisting of two executables, one for each encoding and decoding files. These are thin wrappers around a core stream/file API.\n\nSee _D.J.C, MacKay, 'Information theory, inference, and learning algorithms. Cambridge University Press, 2003_ for reference on the algorithms.\n\n## Encoding\n\nThe encoding algorithm follows the given spec, so no innovations there. A few optimizations are made however. First, the CDF of the degree distribution, M(d), is precomputed for all degrees d = 1, ..., K. This CDF is represented as an array mapping index d => M(d), so sampling from the degree distribution mu(d) becomes a linear search through the CDF array looking for the bucket our random number on \\[0, 1) landed in. This random number is generated as specified using the linear congruential generator. \n\nSecond, the integer representation of all blocks is held in RAM for maximum speed in block sample generation. This is a limitation on the size of the file practically encoded on most computers, but this decision does not reach far into other parts of the design, and it can be easily addressed if necessary for better memory scalability.\n\n```python\nfrom sys import stdout\nfrom lt import encode\n\n# Stream a fountain of 1024B blocks to stdout\nblock_size = 1024\nwith open(filename, 'rb') as f:\n for block in encode.encoder(f, block_size):\n stdout.buffer.write(block)\n```\n\n## Decoding\n \nThe decoder reads the header, then the body, of each incoming block and conducts all possible steps in the belief propagation algorithm on a representation of the source node/check node graph that become possible given the new check node. This is done using an online algorithm, which computes the appropriate messages incrementally and passes them eagerly as the value of source nodes is resolved. Thus, the decoder will finish decoding once it has read only as many blocks is necessary in the stream to decode the file, and it seems to scale well as the file size, and block size increase.\n\n```python\nfrom sys import stdin\nfrom lt import decode\n\n# Block to fully decode transmission incoming on stdin\ndata = decode.decode(stdin.buffer)\n\n# Feed the decoder as blocks come in\ndecoder = decode.LtDecoder()\nfor block in decode.read_blocks(some_stream):\n decoder.consume_block(block)\n if decoder.is_done():\n break \n\n# Write bytes payload to stream\ndecoder.stream_dump(some_out_stream)\n\n# Get entire transmission as bytes\ndata = decoder.bytes_dump()\n```\n## Commandline Usage\n\n To run the encoder, invoke the following from the shell\n $ ./bin/encoder [c] [delta]\n\n To run the decoder, run the following\n $ ./bin/decoder \n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anrosent/LT-Code", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "lt-code", "package_url": "https://pypi.org/project/lt-code/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lt-code/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/anrosent/LT-Code" }, "release_url": "https://pypi.org/project/lt-code/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "An implementation of an Encoder and Decoder for the Luby Transform Fountain code. Useful for transmitting data over very lossy channels where retry-based transmission protocols struggle.", "version": "0.3.3" }, "last_serial": 2159877, "releases": { "0.1": [ { "comment_text": "built for Linux-3.13.0-83-generic-x86_64-with-glibc2.9", "digests": { "md5": "c14a26a31f2f45e7e576daeb7ea04d0e", "sha256": "a99c4d01f2ee0385e99b9aad26a00646b5246771b0a22c227910309a4330ae45" }, "downloads": -1, "filename": "lt-code-0.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "c14a26a31f2f45e7e576daeb7ea04d0e", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 4025, "upload_time": "2016-04-22T02:51:49", "url": "https://files.pythonhosted.org/packages/d5/69/3cf36acbb015addde01ffdb6dfab4598d8789467082881aef58dfe949f3f/lt-code-0.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "7a41961a7465ac1cbc22e2e5bc0e367d", "sha256": "d9bddfe3f553a6e467f55329843db3e9f3217227edb22aae45fcaaea8791dbbb" }, "downloads": -1, "filename": "lt-code-0.1.tar.gz", "has_sig": false, "md5_digest": "7a41961a7465ac1cbc22e2e5bc0e367d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3278, "upload_time": "2016-04-22T02:53:25", "url": "https://files.pythonhosted.org/packages/75/7f/b71b052c982c977977d2428c1e3a76afb0eeb2e1c250b6f9b34cb0ae3eb1/lt-code-0.1.tar.gz" } ], "0.2": [ { "comment_text": "built for Linux-3.13.0-83-generic-x86_64-with-glibc2.9", "digests": { "md5": "8dde6f2bddcb898667f1d6c3d6753543", "sha256": "7c5f523880320fd2e0b8d4de85fda77760f6723e370d0a32beb9ceafaa826541" }, "downloads": -1, "filename": "lt-code-0.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "8dde6f2bddcb898667f1d6c3d6753543", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 11010, "upload_time": "2016-04-22T03:10:17", "url": "https://files.pythonhosted.org/packages/04/d5/7693a9620d16650d2b56748717d659433e9c010332c94218360b661df19f/lt-code-0.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "dbe16de183a3c56de587065561ca3a00", "sha256": "d062fff2a1dbe4e013aed349cdd79d377ae56a5228a35c309e3505e5c126d326" }, "downloads": -1, "filename": "lt-code-0.2.tar.gz", "has_sig": false, "md5_digest": "dbe16de183a3c56de587065561ca3a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7129, "upload_time": "2016-04-22T03:09:30", "url": "https://files.pythonhosted.org/packages/b6/ec/408144b12af5a46524f304d22b6db190203b819cff6da206c12a90915cd6/lt-code-0.2.tar.gz" } ], "0.3": [ { "comment_text": "built for Linux-3.13.0-83-generic-x86_64-with-glibc2.4", "digests": { "md5": "b157ad939c51950d6b000659f65d4194", "sha256": "2594d936d5ca7dc140edf8b6dce70741947fb781c89dd195c863416c298cdda3" }, "downloads": -1, "filename": "lt-code-0.3.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "b157ad939c51950d6b000659f65d4194", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 9460, "upload_time": "2016-04-22T03:36:22", "url": "https://files.pythonhosted.org/packages/85/67/977aaea5f36b8390bd3cd707d204819c17e908256e390384e5c6eac07e55/lt-code-0.3.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "5e26f78c1f0262d2346ddc90e28d6676", "sha256": "e90a28026c972e60b3a51933c492bf8aa28b6eeca2ec83bdf5619a199518b069" }, "downloads": -1, "filename": "lt-code-0.3.tar.gz", "has_sig": false, "md5_digest": "5e26f78c1f0262d2346ddc90e28d6676", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7225, "upload_time": "2016-04-22T03:36:54", "url": "https://files.pythonhosted.org/packages/9e/57/7db57a1b51db0f4b6f9256227588ca5e164859e0f940269915c85dc7840b/lt-code-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "built for Linux-3.13.0-83-generic-x86_64-with-glibc2.9", "digests": { "md5": "ab41f8489f543a2e9c02c6e7c920d230", "sha256": "8c899174cc3e4247273ba6ac349fad1dd1465627e227c6dd54d4ee145dd89a52" }, "downloads": -1, "filename": "lt-code-0.3.1.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "ab41f8489f543a2e9c02c6e7c920d230", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 14346, "upload_time": "2016-04-30T19:11:53", "url": "https://files.pythonhosted.org/packages/9b/8e/a1adac8d0c1064f268c3238f9631c6475b37049111819c8f02611969e547/lt-code-0.3.1.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "db381c3f8db443c128ddba432fb1a3d3", "sha256": "1fc0c341f6bf375048f3d4ee56614b123104a14c6796cb39e16ec2744b90708e" }, "downloads": -1, "filename": "lt-code-0.3.1.tar.gz", "has_sig": false, "md5_digest": "db381c3f8db443c128ddba432fb1a3d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7266, "upload_time": "2016-04-30T19:12:14", "url": "https://files.pythonhosted.org/packages/1f/2c/59f8278d62580a3840908e2cfb2bc23262f0a27483b8ee333f4e99e80c2f/lt-code-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "built for Linux-3.13.0-83-generic-x86_64-with-glibc2.9", "digests": { "md5": "d5f2974983172c1ad0beb03b3d630dd6", "sha256": "3104904612bb42a15642170eb80f64e6e6aac8f21c781377534797748d3a6a90" }, "downloads": -1, "filename": "lt-code-0.3.2.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "d5f2974983172c1ad0beb03b3d630dd6", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 14345, "upload_time": "2016-04-30T20:12:35", "url": "https://files.pythonhosted.org/packages/65/73/6da549f744cee467754f0576f44e310f328a316aaf017878c68aaeffc509/lt-code-0.3.2.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "44fed3f133f8a352aefd1123e56ef547", "sha256": "72798c188a7c468c3f8b53325bb28cdcaa5755abd829b4ea4c782c715e2bcfb2" }, "downloads": -1, "filename": "lt-code-0.3.2.tar.gz", "has_sig": false, "md5_digest": "44fed3f133f8a352aefd1123e56ef547", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7265, "upload_time": "2016-04-30T20:12:39", "url": "https://files.pythonhosted.org/packages/27/ff/97abe48a1a96cdd6601af272ac67a9c32e05c5e9f37b527f98c0c9ac8327/lt-code-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "built for Linux-3.13.0-85-generic-x86_64-with-glibc2.9", "digests": { "md5": "a4597d60d370892438c83f9bd140dbd9", "sha256": "03a8f569003f0700094e9ebd01546782fca2ed49054bc896e70464d5a5f32ebc" }, "downloads": -1, "filename": "lt-code-0.3.3.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "a4597d60d370892438c83f9bd140dbd9", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 14533, "upload_time": "2016-06-10T02:46:28", "url": "https://files.pythonhosted.org/packages/5b/c4/e73d912b4964253b86ca5f872b329f575a24e0c04f74e66f65579c3e8ed7/lt-code-0.3.3.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "23efbb696d253f772951644c102e0126", "sha256": "66ad2abe97b0374a549a3b445cd43703b569b7358f42f2eba96a46251d74c7f6" }, "downloads": -1, "filename": "lt-code-0.3.3.tar.gz", "has_sig": false, "md5_digest": "23efbb696d253f772951644c102e0126", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7328, "upload_time": "2016-06-10T02:46:23", "url": "https://files.pythonhosted.org/packages/9c/26/6285f43fa1715c4167ff769aad445799489054bcce9628f2b1b9994e26cd/lt-code-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "built for Linux-3.13.0-85-generic-x86_64-with-glibc2.9", "digests": { "md5": "a4597d60d370892438c83f9bd140dbd9", "sha256": "03a8f569003f0700094e9ebd01546782fca2ed49054bc896e70464d5a5f32ebc" }, "downloads": -1, "filename": "lt-code-0.3.3.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "a4597d60d370892438c83f9bd140dbd9", "packagetype": "bdist_dumb", "python_version": "any", "requires_python": null, "size": 14533, "upload_time": "2016-06-10T02:46:28", "url": "https://files.pythonhosted.org/packages/5b/c4/e73d912b4964253b86ca5f872b329f575a24e0c04f74e66f65579c3e8ed7/lt-code-0.3.3.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "23efbb696d253f772951644c102e0126", "sha256": "66ad2abe97b0374a549a3b445cd43703b569b7358f42f2eba96a46251d74c7f6" }, "downloads": -1, "filename": "lt-code-0.3.3.tar.gz", "has_sig": false, "md5_digest": "23efbb696d253f772951644c102e0126", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7328, "upload_time": "2016-06-10T02:46:23", "url": "https://files.pythonhosted.org/packages/9c/26/6285f43fa1715c4167ff769aad445799489054bcce9628f2b1b9994e26cd/lt-code-0.3.3.tar.gz" } ] }