Thank you for the clarification.

Now I am avoiding using QDataStream, because in general serialization purposes I use QDataStream very often, and after reading that it has support for readRawData I thought it was the way to go.

Thank you again, whenever I come with a solution I will inform the others in this post as well.