Function reed_solomon_simd::encode

source ·
pub fn encode<T>(
    original_count: usize,
    recovery_count: usize,
    original: T
) -> Result<Vec<Vec<u8>>, Error>
where T: IntoIterator, T::Item: AsRef<[u8]>,
Expand description

Encodes in one go using ReedSolomonEncoder, returning generated recovery shards.

  • Original shards have indexes 0..original_count corresponding to the order in which they are given.
  • Recovery shards have indexes 0..recovery_count corresponding to their position in the returned Vec.
  • These same indexes must be used when decoding.

See simple usage for an example.