as Dan said. Encode/decode the data as a bitstream with only used bits. Easy with masks & shifts (as you already know).
Then try to pack it using any available packer, and if the size is smaller, use the packed version else use the unpacked version.
(if you have only one player and the name is the same, the packing will save data
)