bp_core/coding/
mod.rs

1//! Erasure coding layer — Random Linear Network Coding (RLNC) over GF(2⁸).
2//!
3//! ## Why RLNC
4//!
5//! RLNC has a property that standard Reed-Solomon and RaptorQ lack: a node can
6//! **recode** — produce a new valid encoded fragment by recombining the fragments
7//! it already holds, without ever reconstructing the original data.  This is the
8//! key requirement for BillPouch's distributed fragment replication.
9//!
10//! ## Sub-modules
11//!
12//! - [`gf256`] — arithmetic in GF(2⁸) (add, mul, div, inv).
13//! - [`rlnc`]  — encode, recode and decode operations on byte chunks.
14
15pub mod gf256;
16pub mod params;
17pub mod rlnc;
18
19pub use params::{compute_coding_params, effective_recovery_probability, NetworkCodingParams};
20pub use rlnc::{decode, encode, recode, EncodedFragment};