I have objects with lots of boolean properties, so I am using bitfields to pack the properties more compact. I also want to be able to serialize and deserializa those properties in a compact way, e.g. not field by field but by serializing and deserializing the 64 bit uint that holds the fields. This way is not only much faster (e.g. avoid all the shifting and stuff) but 8 times more memory efficient.
However, I read that the standard provides no guarantee that bitfield implementation will be uniform across different platforms. Can I expect that "bulk" binary serialization of the bitfield container will produce uniform results across platforms? Or perhaps it will be safer to go for manual shifting and masking when working with the properties so that bulk serialization and deserialization is possible?