1 unstable release

0.1.0 Apr 15, 2024

#1110 in Encoding

Download history 4337/week @ 2025-03-12 4333/week @ 2025-03-19 3482/week @ 2025-03-26 3439/week @ 2025-04-02 4043/week @ 2025-04-09 3572/week @ 2025-04-16 4873/week @ 2025-04-23 5050/week @ 2025-04-30 5196/week @ 2025-05-07 5174/week @ 2025-05-14 6425/week @ 2025-05-21 5998/week @ 2025-05-28 5699/week @ 2025-06-04 4395/week @ 2025-06-11 5529/week @ 2025-06-18 6610/week @ 2025-06-25

23,621 downloads per month
Used in 11 crates (2 directly)

Apache-2.0

345KB
846 lines

Leopard codec

This is a Rust rewrite of a Go O(n*log n) implementation of Reed-Solomon codes, ported from the klauspost/reedsolomon, which is a port of the C++ library catid/leopard.

The original implementation is based on the paper:

S.-J. Lin, T. Y. Al-Naffouri, Y. S. Han, and W.-H. Chung,

"Novel Polynomial Basis with Fast Fourier Transform and Its Application to Reed-Solomon Erasure Codes"

IEEE Trans. on Information Theory, pp. 6284-6299, November, 2016.

Features support

The leopard algorithm uses either 8-bit or 16-bit Galois fields with Cantor basis. The 8-bit implementation should be used with up to 256 total shards and 16-bit when more shards are needed.

  • Encoding parity shards using 8-bit leopard algorithm
  • Reconstructing shards using 8-bit leopard algorithm
  • Encoding parity shards using 16-bit leopard algorithm
  • Reconstructing shards using 16-bit leopard algorithm

Dependencies

~0.4–0.9MB
~18K SLoC