(self, size: int)
| 30 | return self.end - self.current |
| 31 | |
| 32 | def get_bytes(self, size: int) -> bytes: |
| 33 | assert size >= 0 |
| 34 | if size > self.remaining(): |
| 35 | raise dns.exception.FormError |
| 36 | output = self.wire[self.current : self.current + size] |
| 37 | self.current += size |
| 38 | self.furthest = max(self.furthest, self.current) |
| 39 | return output |
| 40 | |
| 41 | def get_counted_bytes(self, length_size: int = 1) -> bytes: |
| 42 | length = int.from_bytes(self.get_bytes(length_size), "big") |
no test coverage detected