binhex.Error

exception binhex.Error Exception raised when something can’t be encoded using the binhex format (for example, a filename is too long to fit in the filename field), or when input is not properly encoded binhex data.

binascii.Incomplete

exception binascii.Incomplete Exception raised on incomplete data. These are usually not programming errors, but may be handled by reading a little more data and trying again.

binascii.crc_hqx()

binascii.crc_hqx(data, value) Compute the binhex4 crc value of data, starting with value as the initial crc, and return the result.

binascii.rlecode_hqx()

binascii.rlecode_hqx(data) Perform binhex4 style RLE-compression on data and return the result.

binascii.Error

exception binascii.Error Exception raised on errors. These are usually programming errors.

binascii.crc32()

binascii.crc32(data[, value]) Compute CRC-32, the 32-bit checksum of data, starting with an initial CRC of value. The default initial CRC is zero. The algorithm is consistent with the ZIP file checksum. Since the algorithm is designed for use as a checksum algorithm, it is not suitable for use as a general hash algorithm. Use as follows: print(binascii.crc32(b"hello world")) # Or, in two pieces: crc = binascii.crc32(b"hello") crc = binascii.crc32(b" world", crc) print('crc32 = {:#010x}'.form

binascii.hexlify()

binascii.hexlify(data) Return the hexadecimal representation of the binary data. Every byte of data is converted into the corresponding 2-digit hex representation. The returned bytes object is therefore twice as long as the length of data.

binascii.rledecode_hqx()

binascii.rledecode_hqx(data) Perform RLE-decompression on the data, as per the binhex4 standard. The algorithm uses 0x90 after a byte as a repeat indicator, followed by a count. A count of 0 specifies a byte value of 0x90. The routine returns the decompressed data, unless data input data ends in an orphaned repeat indicator, in which case the Incomplete exception is raised. Changed in version 3.2: Accept only bytestring or bytearray objects as input.

binascii.b2a_uu()

binascii.b2a_uu(data) Convert binary data to a line of ASCII characters, the return value is the converted line, including a newline char. The length of data should be at most 45.

binascii.a2b_uu()

binascii.a2b_uu(string) Convert a single line of uuencoded data back to binary and return the binary data. Lines normally contain 45 (binary) bytes, except for the last line. Line data may be followed by whitespace.