public void compress(long maxDelta) {
        long[] bandBoundaries = computeBandBoundaries(maxDelta);
        for (int i = this.numTuples - 2; i >= 0; i--) {
            if (this.summary[i].delta >= this.summary[i + 1].delta) {
                int band = 0;
                while (this.summary[i].delta < bandBoundaries[band]) {
                    band++;
                }
                long belowBandThreshold = Long.MAX_VALUE;
                if (band > 0) {
                    belowBandThreshold = bandBoundaries[band - 1];
                }
                long mergeG = this.summary[i + 1].g + this.summary[i].g;
                int childI = i - 1;
                while (((mergeG + this.summary[i + 1].delta) < maxDelta)
                        && (childI >= 0)
                        && (this.summary[childI].delta >= belowBandThreshold)) {
                    mergeG += this.summary[childI].g;
                    childI--;
                }
                if (mergeG + this.summary[i + 1].delta < maxDelta) {
                    // merge
                    int numDeleted = i - childI;
                    this.summary[childI + 1] = new Tuple(this.summary[i + 1].v,
                            mergeG, this.summary[i + 1].delta);
                    // todo complete & test this multiple delete
                    System.arraycopy(this.summary, i + 2, this.summary,
                            childI + 2, this.numTuples - (i + 2));
                    for (int j = this.numTuples - numDeleted; j < this.numTuples; j++) {
                        this.summary[j] = null;
                    }
                    this.numTuples -= numDeleted;
                    i = childI + 1;
                }
            }
        }
    }