What you might want to do is stay away from endian types and use only "network order" types. In
. Character types should be fine. These can be packed and unpacked across different platforms with no data mangling.
Barring that, maybe you could show, or at least describe the way you're packing your data.