in-built functions in C++ that can save the state of the object at that time and restore it afterwards. It's not there in C AFAIK.
with serialization you should take care of endianness, parsing, and other problematic things
i meant, "instead of a packed struct to read directly from a binary stream, i find that it's better to use a free function to parse a binary stream into a normal struct. the penalty can be very small"
Обсуждают сегодня