Function leopard_codec::encode

source ·
pub fn encode(shards: &mut [impl AsMut<[u8]>], data_shards: usize) -> Result<()>
Expand description

Encode parity data into given shards.

The first data_shards shards will be the treated as data shards and the rest as parity shards.

§Errors

If too many shards provided or shards were of incorrect or different lengths.