Skip to main content

shard_header

Function shard_header 

Source
pub fn shard_header(bytes: &[u8]) -> Option<(u64, usize, usize)>
Expand description

Peek a framed shard’s identity without copying its payload: (msg_id, k, n). None if bytes is not a FEC shard (wrong magic / too short). Lets a receiver group shards by message and know how many it needs (k) before reconstructing.