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 .