Convert the specified bytes to a binary string. Args: data_bytes (bytes) : Data bytes zero_pad_bit_len (int, optional): Zero pad length in bits, 0 if not specified Returns: str: Binary string
(data_bytes: bytes,
zero_pad_bit_len: int = 0)
| 100 | |
| 101 | @staticmethod |
| 102 | def ToBinaryStr(data_bytes: bytes, |
| 103 | zero_pad_bit_len: int = 0) -> str: |
| 104 | """ |
| 105 | Convert the specified bytes to a binary string. |
| 106 | |
| 107 | Args: |
| 108 | data_bytes (bytes) : Data bytes |
| 109 | zero_pad_bit_len (int, optional): Zero pad length in bits, 0 if not specified |
| 110 | |
| 111 | Returns: |
| 112 | str: Binary string |
| 113 | """ |
| 114 | return IntegerUtils.ToBinaryStr(BytesUtils.ToInteger(data_bytes), zero_pad_bit_len) |
| 115 | |
| 116 | @staticmethod |
| 117 | def ToInteger(data_bytes: bytes, |