pub fn coalesce_byte_ranges( ranges: &[ByteRange], max_gap: u64, ) -> Vec<ByteRange>
Merge overlapping or near-adjacent ranges (gap <= max_gap) into one.
<= max_gap