def readall(self):
        res = bytearray()
        while True:
            data = self.read(DEFAULT_BUFFER_SIZE)
            if not data:
                break
            res += data
        if res:
            return bytes(res)
        else:
            # b'' or None
            return data
Read until EOF, using multiple read() call.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/_pyio.py/RawIOBase.readall