def serialize(to_serialize, version, desc, iv) ->bytes:
    """This serializes the prepared header, prepending the version and the
    length of the following header.
    """
    return bytes([version >> 8, version & 255, len(desc)]
        ) + desc + iv + to_serialize
