Function iroh_blobs::get::request::random_hash_seq_ranges

source ·
pub fn random_hash_seq_ranges(sizes: &[u64], rng: impl Rng) -> RangeSpecSeq
Expand description

Given a sequence of sizes of children, generate a range spec that selects a random chunk of a random child.

The random chunk is chosen uniformly from the chunks of the children, so larger children are more likely to be selected.