@Override public void move(int bits) { this.nextLength -= bits; if(this.nextLength <= 0) { do { this.nextBit = null; updateNext(); this.hasNext = moveToNextRLW(); } while(this.nextLength <= 0 && this.hasNext); } }
@Override public void move(int bits) { this.nextLength -= bits; if(this.nextLength <= 0) { do { this.nextBit = null; updateNext(); this.hasNext = moveToNextRLW(); } while(this.nextLength <= 0 && this.hasNext); } }
private boolean moveToNextRLW() { while (!runningHasNext() && !literalHasNext()) { if (!hasNextRLW()) { return this.nextBit!=null; } setRLW(nextRLW()); updateNext(); } return true; }
private boolean moveToNextRLW() { while (!runningHasNext() && !literalHasNext()) { if (!hasNextRLW()) { return this.nextBit!=null; } setRLW(nextRLW()); updateNext(); } return true; }
private void updateNext() { if(runningHasNext()) { if(this.nextBit == null || this.nextBit == this.runningBit) { this.nextBit = this.runningBit; int offset = runningOffset(); this.nextLength += offset; movePosition(offset); updateNext(); } } else if (literalHasNext()) { boolean b = currentWordBit(); if(this.nextBit == null || this.nextBit == b) { this.nextBit = b; this.nextLength++; movePosition(1); shiftWordMask(); updateNext(); } } else { moveToNextRLW(); } }
private void updateNext() { if(runningHasNext()) { if(this.nextBit == null || this.nextBit == this.runningBit) { this.nextBit = this.runningBit; int offset = runningOffset(); this.nextLength += offset; movePosition(offset); updateNext(); } } else if (literalHasNext()) { boolean b = currentWordBit(); if(this.nextBit == null || this.nextBit == b) { this.nextBit = b; this.nextLength++; movePosition(1); shiftWordMask(); updateNext(); } } else { moveToNextRLW(); } }