#reed-solomon #erasure #algorithm #encoding #codec

reed-solomon-novelpoly

An implementation of a reed solomon code / encoder / decoder with complexity O(n lg(n))

6 releases (stable)

2.0.0 Jan 25, 2024
1.0.2 Sep 17, 2023
1.0.1 Aug 30, 2023
1.0.0 Mar 26, 2021
0.0.3 Mar 19, 2021

#54 in Algorithms

Download history 25530/week @ 2024-01-19 24975/week @ 2024-01-26 23082/week @ 2024-02-02 23456/week @ 2024-02-09 30579/week @ 2024-02-16 30603/week @ 2024-02-23 24914/week @ 2024-03-01 25044/week @ 2024-03-08 25309/week @ 2024-03-15 27837/week @ 2024-03-22 32841/week @ 2024-03-29 35080/week @ 2024-04-05 32767/week @ 2024-04-12 30596/week @ 2024-04-19 20915/week @ 2024-04-26 20896/week @ 2024-05-03

111,360 downloads per month
Used in 21 crates (4 directly)

Apache-2.0 AND MIT

110KB
2.5K SLoC

Rust 2.5K SLoC // 0.1% comments C 269 SLoC // 0.1% comments

reed-solomon-novelpoly

An implementation of Novel Polynomial Basis and its Application to Reed-Solomon Erasure Codes 1 2 3.

Runs encoding and reconstruction in O(n lg(n)). Note that for small number n there is a static offset due to a walsh transform over the full domain in reconstruction.

Goals

Be really fast for n > 100.

Benchmarking

For benchmarking the implementation against itself and the naive implementation, criterion is used.

cargo bench

Fuzzing

Currently honggfuzz is used.

Install cargo install cargo-hongg and run with:

cargo-hongg fuzz --bin <binary_name>

Dependencies

~1.7–2.6MB
~52K SLoC