pub fn encode_source_block(
source_block: &[u8],
max_source_symbols: usize,
nb_repair: usize,
) -> (Vec<Vec<u8>>, u32)Expand description
Encodes a source block into encoding symbols using Raptor codes.
§Parameters
source_block: A slice of vectors containing the source symbols.max_source_symbols: Max number of source symbols inside the source blocknb_repair: The number of repair symbols to be generated.
§Returns
a Tuple
Vec<Vec<u8>>: A vector of vectors of bytes representing the encoding symbols (source symbols + repair symbol).u32: Number of source symbols (k)
The function uses Raptor codes to generate the specified number of repair symbols from the source block.