Skip to main content

red_blocks

Function red_blocks 

Source
pub(crate) fn red_blocks(
    payload: &[u8],
    primary_ts: i64,
) -> Option<([(i64, usize, usize); 5], usize)>
Expand description

The blocks of an RFC 2198 payload, oldest first, as (ts, start, len) within it: each redundant block at primary_ts less its 14-bit offset (an empty one left out), then the primary, which is whatever bytes remain. None for a payload whose headers or blocks run past it, or that carries more than RED_MAX_DISTANCE redundant blocks.