def __init__(self, names, mode='rb'):
    self.mode = mode
    self._files = []
    curr_offset = 0
    self._names = tuple(names)
    for (idx, f) in enumerate(self._names):
        s = stat(f)
        self._files.append((idx, curr_offset, s.st_size))
        curr_offset += s.st_size
    self._total_size = curr_offset
def __init__(self, names, mode='rb'):
    self.mode = mode
    self._files = []
    curr_offset = 0
    self._names = tuple(names)
    for (idx, f) in enumerate(self._names):
        s = stat(f)
        self._files.append((idx, curr_offset, s.st_size))
        curr_offset += s.st_size
    self._total_size = curr_offset