bundles/org.tukani.xz/src/org/tukaani/xz/lz/LZEncoder.java
int movePos(int requiredForFlushing, int requiredForFinishing) {
        assert requiredForFlushing >= requiredForFinishing;

        ++readPos;
        int avail = writePos - readPos;

        if (avail < requiredForFlushing) {
            if (avail < requiredForFinishing || !finishing) {
                ++pendingSize;
                avail = 0;
            }
        }

        return avail;
    }
int movePos(int requiredForFlushing, int requiredForFinishing) {
        assert requiredForFlushing >= requiredForFinishing;

        ++readPos;
        int avail = writePos - readPos;

        if (avail < requiredForFlushing) {
            if (avail < requiredForFinishing || !finishing) {
                ++pendingSize;
                avail = 0;
            }
        }

        return avail;
    }
int movePos ( int requiredForFlushing , int requiredForFinishing ) { assert requiredForFlushing >= requiredForFinishing ; ++ readPos ; int avail = writePos - readPos ; if ( avail < requiredForFlushing ) { if ( avail < requiredForFinishing || ! finishing ) { ++ pendingSize ; avail = 0 ; } } return avail ; }
Moves to the next byte, checks if there is enough input available,
and returns the amount of input available.

@param       requiredForFlushing
minimum number of available bytes when
flushing; encoding may be continued with
new input after flushing
@param       requiredForFinishing
minimum number of available bytes when
finishing; encoding must not be continued
after finishing or the match finder state
may be corrupt

@return      the number of bytes available or zero if there
is not enough input available
Moves to the next byte checks if there is enough input available and returns the amount of input available .