A binary serialiser