bundles/org.tukani.xz/src/org/tukaani/xz/lz/LZEncoder.java
public int fillWindow(byte[] in, int off, int len) {
        assert !finishing;

        // Move the sliding window if needed.
        if (readPos >= bufSize - keepSizeAfter)
            moveWindow();

        // Try to fill the dictionary buffer. If it becomes full,
        // some of the input bytes may be left unused.
        if (len > bufSize - writePos)
            len = bufSize - writePos;

        System.arraycopy(in, off, buf, writePos, len);
        writePos += len;

        // Set the new readLimit but only if there's enough data to allow
        // encoding of at least one more byte.
        if (writePos >= keepSizeAfter)
            readLimit = writePos - keepSizeAfter;

        processPendingBytes();

        // Tell the caller how much input we actually copied into
        // the dictionary.
        return len;
    }
public int fillWindow(byte[] in, int off, int len) {
        assert !finishing;

        // Move the sliding window if needed.
        if (readPos >= bufSize - keepSizeAfter)
            moveWindow();

        // Try to fill the dictionary buffer. If it becomes full,
        // some of the input bytes may be left unused.
        if (len > bufSize - writePos)
            len = bufSize - writePos;

        System.arraycopy(in, off, buf, writePos, len);
        writePos += len;

        // Set the new readLimit but only if there's enough data to allow
        // encoding of at least one more byte.
        if (writePos >= keepSizeAfter)
            readLimit = writePos - keepSizeAfter;

        processPendingBytes();

        // Tell the caller how much input we actually copied into
        // the dictionary.
        return len;
    }
public int fillWindow ( byte [ ] in , int off , int len ) { assert ! finishing ; // Move the sliding window if needed. if ( readPos >= bufSize - keepSizeAfter ) moveWindow ( ) ; // Try to fill the dictionary buffer. If it becomes full, // some of the input bytes may be left unused. if ( len > bufSize - writePos ) len = bufSize - writePos ; System . arraycopy ( in , off , buf , writePos , len ) ; writePos += len ; // Set the new readLimit but only if there's enough data to allow // encoding of at least one more byte. if ( writePos >= keepSizeAfter ) readLimit = writePos - keepSizeAfter ; processPendingBytes ( ) ; // Tell the caller how much input we actually copied into // the dictionary. return len ; }
Copies new data into the LZEncoder's buffer.
Copies new data into the LZEncoder s buffer .