struct.pack(fmt, v1, v2, ...) Return a bytes object containing the values v1, v2, ... packed according to
decode(object[, final]) Decodes object (taking the current state of the decoder into account) and returns the resulting
reset() Resets the codec buffers used for keeping state. Note that no stream repositioning should
decode The stateless encoding and decoding functions. These must be functions or methods which have the same interface as the
codecs.lookup_error(name) Return the error handler previously registered under the name name. Raises
size The calculated size of the struct (and hence of the bytes object produced by the pack() method) corresponding
codecs.register(search_function) Register a codec search function. Search functions are expected to take one argument, being
write(object) Writes the object’s contents encoded to the stream.
codecs.encode(obj, encoding='utf-8', errors='strict') Encodes obj using the codec registered for encoding
codecs.EncodedFile(file, data_encoding, file_encoding=None, errors='strict') Return a StreamRecoder instance, a
Page 4 of 8