ps-ecc 0.1.0-9

Generates Reed-Solomon error correction codes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mod constants;
mod implementations;
mod methods;

use constants::POLYNOMIAL_MAX_COEFFICIENTS;

/// A polynomial over GF(256) with at most 255 coefficients.
///
/// Coefficients are stored from degree 0 upward in a fixed stack-allocated
/// array, so the type is `Copy` and never allocates.
#[derive(Clone, Copy, Eq)]
pub struct Polynomial {
    coefficients: [u8; POLYNOMIAL_MAX_COEFFICIENTS],
    degree: u8,
}