💾 Archived View for tris.fyi › pydoc › binascii captured on 2023-04-26 at 13:34:40. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-01-08)
-=-=-=-=-=-=-
Conversion between binary data and ASCII
with_traceback(...) Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>
with_traceback(...) Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>
a2b_base64(data, /) Decode a line of base64 data.
a2b_hex(hexstr, /) Binary data of hexadecimal representation. hexstr must contain an even number of hex digits (upper or lower case). This function is also available as "unhexlify()".
a2b_hqx(data, /) Decode .hqx coding.
a2b_qp(data, header=False) Decode a string of qp-encoded data.
a2b_uu(data, /) Decode a line of uuencoded data.
b2a_base64(data, /, *, newline=True) Base64-code line of data.
b2a_hex(...) Hexadecimal representation of binary data. sep An optional single character or byte to separate hex bytes. bytes_per_sep How many bytes between separators. Positive values count from the right, negative values count from the left. The return value is a bytes object. This function is also available as "hexlify()". Example: >>> binascii.b2a_hex(b'\xb9\x01\xef') b'b901ef' >>> binascii.hexlify(b'\xb9\x01\xef', ':') b'b9:01:ef' >>> binascii.b2a_hex(b'\xb9\x01\xef', b'_', 2) b'b9_01ef'
b2a_hqx(data, /) Encode .hqx data.
b2a_qp(data, quotetabs=False, istext=True, header=False) Encode a string using quoted-printable encoding. On encoding, when istext is set, newlines are not encoded, and white space at end of lines is. When istext is not set, \r and \n (CR/LF) are both encoded. When quotetabs is set, space and tabs are encoded.
b2a_uu(data, /, *, backtick=False) Uuencode line of data.
crc32(data, crc=0, /) Compute CRC-32 incrementally.
crc_hqx(data, crc, /) Compute CRC-CCITT incrementally.
hexlify(...) Hexadecimal representation of binary data. sep An optional single character or byte to separate hex bytes. bytes_per_sep How many bytes between separators. Positive values count from the right, negative values count from the left. The return value is a bytes object. This function is also available as "b2a_hex()".
rlecode_hqx(data, /) Binhex RLE-code binary data.
rledecode_hqx(data, /) Decode hexbin RLE-coded string.
unhexlify(hexstr, /) Binary data of hexadecimal representation. hexstr must contain an even number of hex digits (upper or lower case).