I'm looking for a solution for serializing of c++ packets to a network stream.
I have seen many posts here refering people to:
ACE
Google Protocol Buffers
Boost::Serialization
Qt ::QDataStream
My Requirements/ Constraints:
The solution must be unaware of LitteEndian/BigEndian. Machine Architecture x86/x64 and platform independant.
The foot print (RAM & ROM) of the first 3 solution are too big for my platform,and the fourth is conflicting with the next requirement.
The solution won't require a lot of boilerplate code (there will be 200+ packet to be serialized).
Thanks, Koby Meir
If you find that Google Protocol Buffers are to heavy (I can agree with that because compiled library could take more than 1 MB), you could try the lite version of protobuf which is a few times smaller. It can be enabled in *.proto files by inserting the following line
option optimize_for = LITE_RUNTIME;
But if you need a protobuf solution with minimal overhead I would go with protobuf-c,
a C implementation of protobuf.
It will be a little harder to use, but binary code size overhead should be minimal (30-50 KB). I know that this C implementation is used for example by umurmur - a voice server that runs very well on embedded Linux ARM and MIPS routers.