MCPcopy Create free account
hub / github.com/ccxt/ccxt / ToBinaryStr

Method ToBinaryStr

python/ccxt/static_dependencies/bip/utils/misc/bytes.py:102–114  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 1

ToIntegerMethod · 0.80

Tested by

no test coverage detected