I would like to write the dds messages to a file in order to be able to play them back. I receive a message from the subscriber and I noticed that there are methods within the message such as serialize() and deserialize() part of the generated message class. I am curious as to whether those can be used to get a serialized buffer from the message and if there is any performance penalty in doing so. Please note that the message is of an image so zero copy is a must. The current solution that I have is that I serialize the data manually into my own structure and write it to the file and I do not copy the buffer that contains the data I just write the contents of that buffer directly to the file. I do not know if I use the fastcdr serialization if the image data will be copied to a new serialized buffer or not.