Skip to main content

decode

Function decode 

Source
pub fn decode(
    orig_len: usize,
    k: usize,
    n: usize,
    have: &[(usize, Vec<u8>)],
) -> Option<Vec<u8>>
Expand description

Reconstruct the payload from ANY k (index, shard) pairs out of the n. None if fewer than k distinct valid shards are present (then the message is unrecoverable).