Convert the specified bytes to integer. Args: data_bytes (bytes) : Data bytes endianness ("big" or "little", optional): Endianness (default: big) signed (bool, optional) : True if signed, false otherwise (defa
(data_bytes: bytes,
endianness: Literal["little", "big"] = "big",
signed: bool = False)
| 115 | |
| 116 | @staticmethod |
| 117 | def ToInteger(data_bytes: bytes, |
| 118 | endianness: Literal["little", "big"] = "big", |
| 119 | signed: bool = False) -> int: |
| 120 | """ |
| 121 | Convert the specified bytes to integer. |
| 122 | |
| 123 | Args: |
| 124 | data_bytes (bytes) : Data bytes |
| 125 | endianness ("big" or "little", optional): Endianness (default: big) |
| 126 | signed (bool, optional) : True if signed, false otherwise (default: false) |
| 127 | |
| 128 | Returns: |
| 129 | int: Integer representation |
| 130 | """ |
| 131 | return int.from_bytes(data_bytes, byteorder=endianness, signed=signed) |
| 132 | |
| 133 | @staticmethod |
| 134 | def FromBinaryStr(data: Union[bytes, str], |
no test coverage detected