Pack values without using bitfields