pub fn encode<T>(
original_count: usize,
recovery_count: usize,
original: T,
) -> Result<Vec<Vec<u8>>, Error>
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 returnedVec
. - These same indexes must be used when decoding.
See simple usage for an example.