public boolean digest(byte data) {
        if (count < 0) {
            throw new IllegalArgumentException("ZMessage is complete, and cannot digest more data");
        } else if (count == 0) {
            this.length = data;
            this.txOptions = null;
            if (length > 3) {
                this.payload = new byte[data - 3];
            } else {
                this.payload = null;
            }
        } else if (count == 1) {
            this.type = data;
        } else if (count == 2) {
            this.command = data;
//        } else if (count == length-1) {
//            this.hasFuncID = true;
//            this.funcID = data;
        } else if (count == length) {
            this.checksum = data;
            count = -1;
            return true;
        } else if (count < length) {
            this.payload[count - 3] = data;
        }
        count++;
        return false;
    }