(self)
| 411 | return chunk, contextual_read_length |
| 412 | |
| 413 | def _next(self) -> bytes: |
| 414 | if self.end_reached: |
| 415 | raise StopIteration() |
| 416 | chunk = None |
| 417 | contextual_read_length = self.read_length |
| 418 | if self.read_length == 0: |
| 419 | chunk, contextual_read_length = self._first_iteration() |
| 420 | if chunk is None: |
| 421 | chunk = self._next_chunk() |
| 422 | if self.end_byte is not None and self.read_length >= self.end_byte: |
| 423 | self.end_reached = True |
| 424 | return chunk[: self.end_byte - contextual_read_length] |
| 425 | return chunk |
| 426 | |
| 427 | def __next__(self) -> bytes: |
| 428 | chunk = self._next() |
no test coverage detected