packet: implement Binary(Un)Marshaler