stripe_plan

Function stripe_plan 

Source
pub fn stripe_plan(
    blob_bytes: usize,
    chunk_bytes: usize,
    n_rails: usize,
) -> Vec<Vec<(usize, usize)>>
Expand description

2026-09-25: Split a blob_bytes transfer into chunk_bytes chunks dealt round-robin to n_rails, as per-rail lists of (offset, len). The offset is the chunk’s position in both the staging buffer and the peer slot, so one copy assembles the blob whichever rail moved each chunk. Only the last chunk may be short. Zero chunk_bytes or n_rails counts as 1.