def _get_brange(size, block):
    """
    Chunk up a file into zero-based byte ranges

    Parameters
    ----------
    size : file size
    block : block size
    """
    for offset in range(0, size, block):
        yield offset, min(offset + block - 1, size - 1)
Chunk up a file into zero-based byte ranges

Parameters
----------
size : file size
block : block size
s3fs/utils.py