def _calculate_ranges(value, numsplits):
    """Calculate the number of ranges of bytes, return a list of ranges."""
    lst = []
    for i in range(numsplits):
        lst.append('{0}-{1}'.format(i if i == 0 else int(round(1 + i *
            value / (numsplits * 1.0), 0)), int(round(1 + i * value / (
            numsplits * 1.0) + value / (numsplits * 1.0) - 1, 0))))
    return tuple(lst)
