A binary serialiser to make writing messages easier