Skip to main content

ps_ecc/long/header/overlap_factor/
mod.rs

1mod implementations;
2mod methods;
3
4/// Approximate number of distinct codewords covering each byte.
5///
6/// Integer division of the segment stride makes coverage uneven for the
7/// overlapping factors: bytes near segment boundaries may be covered one
8/// time more, and leading bytes fewer times, than the nominal count.
9#[derive(Clone, Copy, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
10#[repr(u8)]
11pub enum OverlapFactor {
12    /// Each byte is covered once (plain Reed-Solomon, no overlap).
13    #[default]
14    Simple = 0,
15
16    /// Each byte is covered approximately twice.
17    Double = 64,
18
19    /// Each byte is covered approximately three times.
20    Triple = 128,
21
22    /// Each byte is covered approximately four times.
23    Quadruple = 192,
24}