Serialization and deserialization of the inv message