``read16be`` returns a two byte big endian integer from offset incrementing the offset by two. :param int address: offset to set the internal offset before reading :return: a two byte integer at offset. :rtype: int, or None on failure :Example: >>> br.seek(0x100000000) >>> hex(br.
(self, address: Optional[int] = None)
| 10382 | return struct.unpack("<Q", result)[0] |
| 10383 | |
| 10384 | def read16be(self, address: Optional[int] = None) -> Optional[int]: |
| 10385 | """ |
| 10386 | ``read16be`` returns a two byte big endian integer from offset incrementing the offset by two. |
| 10387 | |
| 10388 | :param int address: offset to set the internal offset before reading |
| 10389 | :return: a two byte integer at offset. |
| 10390 | :rtype: int, or None on failure |
| 10391 | :Example: |
| 10392 | |
| 10393 | >>> br.seek(0x100000000) |
| 10394 | >>> hex(br.read16be()) |
| 10395 | '0xcffa' |
| 10396 | >>> |
| 10397 | """ |
| 10398 | if address is not None: |
| 10399 | self.seek(address) |
| 10400 | |
| 10401 | result = self.read(2) |
| 10402 | if (result is None) or (len(result) != 2): |
| 10403 | return None |
| 10404 | return struct.unpack(">H", result)[0] |
| 10405 | |
| 10406 | def read32be(self, address: Optional[int] = None) -> Optional[int]: |
| 10407 | """ |