Things that are layered on top of pack/unpack, that let you define C structures so that the field-type and the field-name are located together.    (normal pack() only uses the type)

DIY

Or you can just DIY: