def unpack_unknown(data, length): assert len(data) >= length warning("unknown type data encounted, length %d" % length ) unknown = data[:length] return known, data[length:]
def unpack_custom(data, length): assert len(data) >= length warning("custom type data encounted, length %d" % length ) custom = data[:length] return custom, data[length:]