'Read data from the file.'

def read(self, size=None):

    if (size is None):
        size = (self.size - self.position)
    else:
        size = min(size, (self.size - self.position))
    if (self.sparse is None):
        return self.readnormal(size)
    else:
        return self.readsparse(size)
