Converts 128 bits integer hkey to binary representation.
(hkey: int)
| 58 | |
| 59 | |
| 60 | def _hkey_to_bytes(hkey: int) -> bytes: |
| 61 | """Converts 128 bits integer hkey to binary representation.""" |
| 62 | max_int64 = 0xFFFFFFFFFFFFFFFF |
| 63 | return struct.pack('=QQ', (hkey >> 64) & max_int64, hkey & max_int64) |
| 64 | |
| 65 | |
| 66 | def _read_hkey(buff: bytes) -> int: |