potc.supports.bin

dump_obj

potc.supports.bin.dump_obj(obj: object) → bytes[source]
Overview:

Dump any object to binary format. In order to reduce the size of bytes as much as possible, zlib compression is applied in this function.

Arguments:
  • obj (object): Any object.

Returns:
  • data (bytes): Dumped bytes data.

load_obj

potc.supports.bin.load_obj(data: bytes) → object[source]
Overview:

Load any object from binary format.

Arguments:
  • data (bytes): Dumped bytes data.

Returns:
  • obj (object): Original object.