754
def _coalesce_offsets(offsets, limit=0, fudge_factor=0, max_size=0,
754
def _coalesce_offsets(offsets, limit=0, fudge_factor=0, max_size=0):
756
755
"""Yield coalesced offsets.
758
757
With a long list of neighboring requests, combine them
759
758
into a single large request, while retaining the original
761
760
Turns [(15, 10), (25, 10)] => [(15, 20, [(0, 10), (10, 10)])]
761
Note that overlapping requests are not permitted. (So [(15, 10), (20,
763
767
:param offsets: A list of (start, length) pairs
764
768
:param limit: Only combine a maximum of this many pairs Some transports