Ported compress to command structure.