docs: def readfmt(stream, fmt):
      """Read and unpack an object from stream, using a struct format string."""
      size = struct.calcsize(fmt)
      blob = stream.read(size)
      return struct.unpack(fmt, blob)