(self)
| 111 | return data |
| 112 | |
| 113 | def readall(self): |
| 114 | chunks = [] |
| 115 | # sys.maxsize means the max length of output buffer is unlimited, |
| 116 | # so that the whole input buffer can be decompressed within one |
| 117 | # .decompress() call. |
| 118 | while data := self.read(sys.maxsize): |
| 119 | chunks.append(data) |
| 120 | |
| 121 | return b"".join(chunks) |
| 122 | |
| 123 | # Rewind the file to the beginning of the data stream. |
| 124 | def _rewind(self): |