bundles/org.tukani.xz/src/org/tukaani/xz/lz/LZEncoder.java
public boolean verifyMatches(Matches matches) {
        int lenLimit = Math.min(getAvail(), matchLenMax);

        for (int i = 0; i < matches.count; ++i)
            if (getMatchLen(matches.dist[i], lenLimit) != matches.len[i])
                return false;

        return true;
    }
public boolean verifyMatches(Matches matches) {
        int lenLimit = Math.min(getAvail(), matchLenMax);

        for (int i = 0; i < matches.count; ++i)
            if (getMatchLen(matches.dist[i], lenLimit) != matches.len[i])
                return false;

        return true;
    }
public boolean verifyMatches ( Matches matches ) { int lenLimit = Math . min ( getAvail ( ) , matchLenMax ) ; for ( int i = 0 ; i < matches . count ; ++ i ) if ( getMatchLen ( matches . dist [ i ] , lenLimit ) != matches . len [ i ] ) return false ; return true ; }
Verifies that the matches returned by the match finder are valid.
This is meant to be used in an assert statement. This is totally
useless for actual encoding since match finder's results should
naturally always be valid if it isn't broken.

@param       matches     return value from <code>getMatches</code>

@return      true if matches are valid, false if match finder is broken
Verifies that the matches returned by the match finder are valid . This is meant to be used in an assert statement . This is totally useless for actual encoding since match finder s results should naturally always be valid if it isn t broken .