Skip to main content

RaptorQ (RFC6330)

Project description

raptorq

Build Status Crates Documentation PyPI

Rust implementation of RaptorQ (RFC6330)

Recovery properties: Reconstruction probability after receiving K + h packets = 1 - 1/256^(h + 1). Where K is the number of packets in the original message, and h is the number of additional packets received. See "RaptorQ Technical Overview" by Qualcomm

This crate requires Rust 1.46 or newer.

Examples

See the examples/ directory for usage.

Benchmarks

The following were run on an Intel Core i5-6600K @ 3.50GHz

Symbol size: 1280 bytes (without pre-built plan)
symbol count = 10, encoded 127 MB in 0.532secs, throughput: 1924.7Mbit/s
symbol count = 100, encoded 127 MB in 0.590secs, throughput: 1734.6Mbit/s
symbol count = 250, encoded 127 MB in 0.572secs, throughput: 1788.4Mbit/s
symbol count = 500, encoded 127 MB in 0.549secs, throughput: 1858.8Mbit/s
symbol count = 1000, encoded 126 MB in 0.599secs, throughput: 1695.5Mbit/s
symbol count = 2000, encoded 126 MB in 0.673secs, throughput: 1509.1Mbit/s
symbol count = 5000, encoded 122 MB in 0.758secs, throughput: 1288.3Mbit/s
symbol count = 10000, encoded 122 MB in 0.953secs, throughput: 1024.7Mbit/s
symbol count = 20000, encoded 122 MB in 1.383secs, throughput: 706.1Mbit/s
symbol count = 50000, encoded 122 MB in 2.041secs, throughput: 478.5Mbit/s

Symbol size: 1280 bytes (with pre-built plan)
symbol count = 10, encoded 127 MB in 0.241secs, throughput: 4248.7Mbit/s
symbol count = 100, encoded 127 MB in 0.160secs, throughput: 6396.5Mbit/s
symbol count = 250, encoded 127 MB in 0.173secs, throughput: 5913.0Mbit/s
symbol count = 500, encoded 127 MB in 0.176secs, throughput: 5798.3Mbit/s
symbol count = 1000, encoded 126 MB in 0.200secs, throughput: 5078.1Mbit/s
symbol count = 2000, encoded 126 MB in 0.208secs, throughput: 4882.8Mbit/s
symbol count = 5000, encoded 122 MB in 0.280secs, throughput: 3487.7Mbit/s
symbol count = 10000, encoded 122 MB in 0.400secs, throughput: 2441.4Mbit/s
symbol count = 20000, encoded 122 MB in 0.494secs, throughput: 1976.8Mbit/s
symbol count = 50000, encoded 122 MB in 0.656secs, throughput: 1488.7Mbit/s

Symbol size: 1280 bytes
symbol count = 10, decoded 127 MB in 0.723secs using 0.0% overhead, throughput: 1416.2Mbit/s
symbol count = 100, decoded 127 MB in 0.701secs using 0.0% overhead, throughput: 1460.0Mbit/s
symbol count = 250, decoded 127 MB in 0.650secs using 0.0% overhead, throughput: 1573.8Mbit/s
symbol count = 500, decoded 127 MB in 0.638secs using 0.0% overhead, throughput: 1599.5Mbit/s
symbol count = 1000, decoded 126 MB in 0.676secs using 0.0% overhead, throughput: 1502.4Mbit/s
symbol count = 2000, decoded 126 MB in 0.764secs using 0.0% overhead, throughput: 1329.4Mbit/s
symbol count = 5000, decoded 122 MB in 0.896secs using 0.0% overhead, throughput: 1089.9Mbit/s
symbol count = 10000, decoded 122 MB in 1.176secs using 0.0% overhead, throughput: 830.4Mbit/s
symbol count = 20000, decoded 122 MB in 1.489secs using 0.0% overhead, throughput: 655.9Mbit/s
symbol count = 50000, decoded 122 MB in 2.633secs using 0.0% overhead, throughput: 370.9Mbit/s

symbol count = 10, decoded 127 MB in 0.713secs using 5.0% overhead, throughput: 1436.1Mbit/s
symbol count = 100, decoded 127 MB in 0.702secs using 5.0% overhead, throughput: 1457.9Mbit/s
symbol count = 250, decoded 127 MB in 0.637secs using 5.0% overhead, throughput: 1605.9Mbit/s
symbol count = 500, decoded 127 MB in 0.613secs using 5.0% overhead, throughput: 1664.8Mbit/s
symbol count = 1000, decoded 126 MB in 0.643secs using 5.0% overhead, throughput: 1579.5Mbit/s
symbol count = 2000, decoded 126 MB in 0.701secs using 5.0% overhead, throughput: 1448.8Mbit/s
symbol count = 5000, decoded 122 MB in 0.826secs using 5.0% overhead, throughput: 1182.3Mbit/s
symbol count = 10000, decoded 122 MB in 1.061secs using 5.0% overhead, throughput: 920.4Mbit/s
symbol count = 20000, decoded 122 MB in 1.380secs using 5.0% overhead, throughput: 707.7Mbit/s
symbol count = 50000, decoded 122 MB in 2.341secs using 5.0% overhead, throughput: 417.2Mbit/s

Public API

Note that the additional classes exported by the benchmarking feature flag are not considered part of this crate's public API. Breaking changes to those classes may occur without warning. The flag is only provided so that internal classes can be used in this crate's benchmarks.

Python bindings

The Python bindings are generated using pyo3.

Some operating systems require additional packages to be installed.

$ sudo apt install python3-dev

maturin is recommended for building the Python bindings in this crate.

$ pip install maturin
$ maturin build --cargo-extra-args="--features python"

Alternatively, refer to the Building and Distribution section in the pyo3 user guide. Note, you must pass the --cargo-extra-args="--features python" argument to Maturin when building this crate to enable the Python binding features.

License

Licensed under

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raptorq-1.6.0.tar.gz (76.7 kB view details)

Uploaded Source

Built Distributions

raptorq-1.6.0-cp38-cp38-manylinux1_x86_64.whl (313.1 kB view details)

Uploaded CPython 3.8

raptorq-1.6.0-cp37-cp37m-manylinux1_x86_64.whl (313.1 kB view details)

Uploaded CPython 3.7m

raptorq-1.6.0-cp36-cp36m-manylinux1_x86_64.whl (313.3 kB view details)

Uploaded CPython 3.6m

raptorq-1.6.0-cp35-cp35m-manylinux1_x86_64.whl (312.8 kB view details)

Uploaded CPython 3.5m

File details

Details for the file raptorq-1.6.0.tar.gz.

File metadata

  • Download URL: raptorq-1.6.0.tar.gz
  • Upload date:
  • Size: 76.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.8.3

File hashes

Hashes for raptorq-1.6.0.tar.gz
Algorithm Hash digest
SHA256 c1ef211c4c685e2b20cdd81d5fff0952bbf643c2a7ad523e8b5f2de8b94fd026
MD5 de16c060b59a32ed2eef5de5cc024534
BLAKE2b-256 121b02242d8fad7bb74b6699cfdecaaeaa5ea8e87ec30fd673d65eff5f3f01b2

See more details on using hashes here.

File details

Details for the file raptorq-1.6.0-cp38-cp38-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for raptorq-1.6.0-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a737c028cc572524013a599fc0048e5e9c0b41617da0e232843a556fae583249
MD5 11915981fedf66dd4bee1e495432bf80
BLAKE2b-256 72d41fd032d6f9bb3455a2dd23ad53c1ce87e09d9075e1b91a041bc039b29642

See more details on using hashes here.

File details

Details for the file raptorq-1.6.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for raptorq-1.6.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 bee4b9e600ec7ee507a9bcc096e508e4bdfe72bd62e050a27c1d1433a1b19f0b
MD5 e96e8653b9dd187320ce91add4f24a56
BLAKE2b-256 64ed7d7a2c5c36a70e370bd451d4e2c60ab726a1eb6ecab5e9be0220509924b5

See more details on using hashes here.

File details

Details for the file raptorq-1.6.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for raptorq-1.6.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 086ef5b3b8686ccdc59a7300a2f6243da4b8b571eb1e1cd7194e8e9b270fd3d4
MD5 c5ac7e73cdfe1190153442784672a6e2
BLAKE2b-256 2ea2a566cdc660dd5f4f88bc8ef10b67d0ee8844e6f2f3a245b95305ab898856

See more details on using hashes here.

File details

Details for the file raptorq-1.6.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for raptorq-1.6.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 eb4a7769ad2041c451412ae1958b137bcb0907e6290ea2ecd96744eec6c9f09c
MD5 a8a2b27984b3305244140200fdaa26c9
BLAKE2b-256 905e244654b1495ed8e25b44b09e1070a201be38f71f27154618b1044aa8c9b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page