Create a bitfield that maps the data you get but be aware that the packing order is compiler/target dependent.