packs/unpacks sequences of values according to the given format