command compack encoder and decoder implemented