
For everything that is not a byte/char you have to check the encoding on different platforms. With integers you have the endianess problem. With floating types you may have different encodings too (I'm not sure if the latest compilers use all the standard IEEE encoding, but I hope they do). So if you encode your data into a byte/char stream then you will not have problems about. Note that you must solve this even if your application saves files and you want that they are binary portable on different platforms. The google protocol is very nice, but I wonder why the first example takes 3 bytes. Isn't it possible to encode it with 2 bytes only? Like with the string "testing" where the header that include the string length (value 7) is encoded with 2 bytes. Andrea -----Messaggio originale----- a possible solution could be to implement my own serializers for integral types, that use the very same bitwise pattern? (endiannes, size, etc.) Akos