(self, n: int = 65535)
| 135 | self._is_first_read: bool = True |
| 136 | |
| 137 | def read(self, n: int = 65535) -> bytes: |
| 138 | method: Callable[[int], bytes] = ( |
| 139 | self._read_unicode if self._is_unicode else self._read_string |
| 140 | ) |
| 141 | result = method(n) |
| 142 | if self._is_first_read: |
| 143 | self._is_first_read = False |
| 144 | result = result.lstrip() |
| 145 | return result |
| 146 | |
| 147 | def _read_string(self, n: int = 65535) -> bytes: |
| 148 | s, e = self._ptr, self._ptr + n |
no outgoing calls