|  line  | 
 true  | 
 false  | 
 branch  | 
 
| 
56
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
 | 
 0  | 
 0  | 
     if (litlen >= (size_t)RUN_MASK)  | 
 
| 
69
 | 
 0  | 
 0  | 
     if (mlen >= (size_t)(ML_MASK+MINMATCH))  | 
 
| 
 | 
 0  | 
 0  | 
     if (mlen >= (size_t)(ML_MASK+MINMATCH))  | 
 
| 
 | 
 0  | 
 0  | 
     if (mlen >= (size_t)(ML_MASK+MINMATCH))  | 
 
| 
 | 
 0  | 
 0  | 
     if (mlen >= (size_t)(ML_MASK+MINMATCH))  | 
 
| 
92
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
 | 
 0  | 
 0  | 
     const U32 lowLimit = (ctx->lowLimit + MAX_DISTANCE > current) ? ctx->lowLimit : current - (MAX_DISTANCE - 1);  | 
 
| 
102
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip + MINMATCH > iHighLimit) return 1;  | 
 
| 
113
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
 | 
 0  | 
 0  | 
     while ((matchIndex < current) && (matchIndex>=lowLimit) && (nbAttempts)) {  | 
 
| 
115
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchIndex >= dictLimit) {  | 
 
| 
121
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
 | 
 0  | 
 0  | 
             if (vLimit > iHighLimit) vLimit = iHighLimit;  | 
 
| 
123
 | 
 0  | 
 0  | 
             if ((ip+matchLength == vLimit) && (vLimit < iHighLimit))  | 
 
| 
 | 
 0  | 
 0  | 
             if ((ip+matchLength == vLimit) && (vLimit < iHighLimit))  | 
 
| 
125
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
             if (matchIndex+matchLength >= dictLimit)  | 
 
| 
129
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (matchLength > best_mlen) {  | 
 
| 
131
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
 | 
 0  | 
 0  | 
             if (matches) {  | 
 
| 
132
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
 | 
 0  | 
 0  | 
                 if (matchIndex >= dictLimit)  | 
 
| 
139
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (best_mlen > LZ4_OPT_NUM) break;  | 
 
| 
142
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
 | 
 0  | 
 0  | 
         if (ip+matchLength >= iHighLimit)   /* equal : no way to know if inf or sup */  | 
 
| 
147
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
 | 
 0  | 
 0  | 
         if (*(ip+matchLength) < *(match+matchLength)) {  | 
 
| 
150
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr0 == (U16)-1) break;  | 
 
| 
157
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (*ptr1 == (U16)-1) break;  | 
 
| 
166
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
 | 
 0  | 
 0  | 
     if (matchNum) *matchNum = mnum;  | 
 
| 
168
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
 | 
 0  | 
 0  | 
     if (!matchNum) return 1;  | 
 
| 
178
 | 
 0  | 
 0  | 
     while(idx < target)  | 
 
| 
 | 
 0  | 
 0  | 
     while(idx < target)  | 
 
| 
 | 
 0  | 
 0  | 
     while(idx < target)  | 
 
| 
 | 
 0  | 
 0  | 
     while(idx < target)  | 
 
| 
190
 | 
 0  | 
 0  | 
     if (ip < ctx->base + ctx->nextToUpdate) return 0;   /* skipped area */  | 
 
| 
 | 
 0  | 
 0  | 
     if (ip < ctx->base + ctx->nextToUpdate) return 0;   /* skipped area */  | 
 
| 
191
 | 
 0  | 
 0  | 
     if (fullUpdate) LZ4HC_updateBinTree(ctx, ip, iHighLimit);  | 
 
| 
 | 
 0  | 
 0  | 
     if (fullUpdate) LZ4HC_updateBinTree(ctx, ip, iHighLimit);  | 
 
| 
232
 | 
 0  | 
 0  | 
     if (sufficient_len >= LZ4_OPT_NUM) sufficient_len = LZ4_OPT_NUM-1;  | 
 
| 
237
 | 
 0  | 
 0  | 
     while (ip < mflimit) {  | 
 
| 
244
 | 
 0  | 
 0  | 
         if (!match_num) { ip++; continue; }  | 
 
| 
246
 | 
 0  | 
 0  | 
         if ((size_t)matches[match_num-1].len > sufficient_len) {  | 
 
| 
257
 | 
 0  | 
 0  | 
             for (matchNb = 0; matchNb < match_num; matchNb++) {  | 
 
| 
258
 | 
 0  | 
 0  | 
                 size_t mlen = (matchNb>0) ? (size_t)matches[matchNb-1].len+1 : MINMATCH;  | 
 
| 
260
 | 
 0  | 
 0  | 
                 for ( ; mlen <= best_mlen ; mlen++) {  | 
 
| 
262
 | 
 0  | 
 0  | 
                     SET_PRICE(mlen, mlen, matches[matchNb].off, 0, cost);   /* updates last_pos and opt[pos] */  | 
 
| 
265
 | 
 0  | 
 0  | 
         if (last_pos < MINMATCH) { ip++; continue; }  /* note : on clang at least, this test improves performance */  | 
 
| 
269
 | 
 0  | 
 0  | 
         for (cur = 1; cur <= last_pos; cur++) {  | 
 
| 
274
 | 
 0  | 
 0  | 
                 if (opt[cur-1].mlen == 1) {  | 
 
| 
277
 | 
 0  | 
 0  | 
                     if (cur > litlen) {  | 
 
| 
287
 | 
 0  | 
 0  | 
                 if (price < (size_t)opt[cur].price)  | 
 
| 
288
 | 
 0  | 
 0  | 
                     SET_PRICE(cur, 1 /*mlen*/, 0 /*off*/, litlen, price);   /* note : increases last_pos */  | 
 
| 
291
 | 
 0  | 
 0  | 
             if (cur == last_pos || curPtr >= mflimit) break;  | 
 
| 
 | 
 0  | 
 0  | 
             if (cur == last_pos || curPtr >= mflimit) break;  | 
 
| 
294
 | 
 0  | 
 0  | 
             if ((match_num > 0) && (size_t)matches[match_num-1].len > sufficient_len) {  | 
 
| 
 | 
 0  | 
 0  | 
             if ((match_num > 0) && (size_t)matches[match_num-1].len > sufficient_len) {  | 
 
| 
304
 | 
 0  | 
 0  | 
                 for (matchNb = 0; matchNb < match_num; matchNb++) {  | 
 
| 
305
 | 
 0  | 
 0  | 
                     size_t ml = (matchNb>0) ? (size_t)matches[matchNb-1].len+1 : MINMATCH;  | 
 
| 
307
 | 
 0  | 
 0  | 
                                 (size_t)matches[matchNb].len : LZ4_OPT_NUM - cur;  | 
 
| 
309
 | 
 0  | 
 0  | 
                     for ( ; ml <= best_mlen ; ml++) {  | 
 
| 
311
 | 
 0  | 
 0  | 
                         if (opt[cur].mlen == 1) {  | 
 
| 
313
 | 
 0  | 
 0  | 
                             if (cur > ll)  | 
 
| 
322
 | 
 0  | 
 0  | 
                         if (cur + ml > last_pos || price < (size_t)opt[cur + ml].price) {  | 
 
| 
 | 
 0  | 
 0  | 
                         if (cur + ml > last_pos || price < (size_t)opt[cur + ml].price) {  | 
 
| 
323
 | 
 0  | 
 0  | 
                             SET_PRICE(cur + ml, ml, matches[matchNb].off, ll, price);  | 
 
| 
340
 | 
 0  | 
 0  | 
             if (ml > cur) break;   /* can this happen ? */  | 
 
| 
346
 | 
 0  | 
 0  | 
         while (cur < last_pos) {  | 
 
| 
349
 | 
 0  | 
 0  | 
             if (ml == 1) { ip++; cur++; continue; }  | 
 
| 
351
 | 
 0  | 
 0  | 
             if ( LZ4HC_encodeSequence(&ip, &op, &anchor, ml, ip - offset, limit, oend) ) return 0;  | 
 
| 
357
 | 
 0  | 
 0  | 
         if ((limit) && (((char*)op - dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize)) return 0;  /* Check output limit */  | 
 
| 
 | 
 0  | 
 0  | 
         if ((limit) && (((char*)op - dest) + lastRun + 1 + ((lastRun+255-RUN_MASK)/255) > (U32)maxOutputSize)) return 0;  /* Check output limit */  | 
 
| 
358
 | 
 0  | 
 0  | 
         if (lastRun>=(int)RUN_MASK) { *op++=(RUN_MASK< 254 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; }  | 
 
| 
 | 
 0  | 
 0  | 
         if (lastRun>=(int)RUN_MASK) { *op++=(RUN_MASK< 254 ; lastRun-=255) *op++ = 255; *op++ = (BYTE) lastRun; }  |