src/main/java/com/googlecode/javaewah32/IteratingBufferedRunningLengthWord32.java
@Override
    public void discardFirstWords(int x) {
        while (x > 0) {
            if (this.brlw.RunningLength > x) {
                this.brlw.RunningLength -= x;
                return;
            }
            x -= this.brlw.RunningLength;
            this.brlw.RunningLength = 0;
            int toDiscard = x > this.brlw.NumberOfLiteralWords ? this.brlw.NumberOfLiteralWords
                    : x;

            this.literalWordStartPosition += toDiscard;
            this.brlw.NumberOfLiteralWords -= toDiscard;
            x -= toDiscard;
            if ((x > 0) || (this.brlw.size() == 0)) {
                if (!this.iterator.hasNext()) {
                    break;
                }
                this.brlw.reset(this.iterator.next());
                this.literalWordStartPosition = this.iterator
                        .literalWords();
            }
        }
    }
@Override
    public void discardFirstWords(int x) {
        while (x > 0) {
            if (this.brlw.RunningLength > x) {
                this.brlw.RunningLength -= x;
                return;
            }
            x -= this.brlw.RunningLength;
            this.brlw.RunningLength = 0;
            int toDiscard = x > this.brlw.NumberOfLiteralWords ? this.brlw.NumberOfLiteralWords
                    : x;

            this.literalWordStartPosition += toDiscard;
            this.brlw.NumberOfLiteralWords -= toDiscard;
            x -= toDiscard;
            if ((x > 0) || (this.brlw.size() == 0)) {
                if (!this.iterator.hasNext()) {
                    break;
                }
                this.brlw.reset(this.iterator.next());
                this.literalWordStartPosition = this.iterator
                        .literalWords();
            }
        }
    }
@ Override public void discardFirstWords ( int x ) { while ( x > 0 ) { if ( this . brlw . RunningLength > x ) { this . brlw . RunningLength -= x ; return ; } x -= this . brlw . RunningLength ; this . brlw . RunningLength = 0 ; int toDiscard = x > this . brlw . NumberOfLiteralWords ? this . brlw . NumberOfLiteralWords : x ; this . literalWordStartPosition += toDiscard ; this . brlw . NumberOfLiteralWords -= toDiscard ; x -= toDiscard ; if ( ( x > 0 ) || ( this . brlw . size ( ) == 0 ) ) { if ( ! this . iterator . hasNext ( ) ) { break ; } this . brlw . reset ( this . iterator . next ( ) ) ; this . literalWordStartPosition = this . iterator . literalWords ( ) ; } } }
Discard first words, iterating to the next running length word if
needed.

@param x the x
Discard first words iterating to the next running length word if needed .