Branch Coverage

compress.c
Criterion Covered Total %
branch 171 186 91.9


line true false branch
48 42 21 while (s->bsLive > 0) {
75 62664 76622 bsNEEDW ( n );
110 5376 21 for (i = 0; i < 256; i++)
111 1033 4343 if (s->inUse[i]) {
157 1075 21 for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
161 1033 21 for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
163 125395 21 for (i = 0; i < s->nblock; i++) {
166 21 125374 j = ptr[i]-1; if (j < 0) j += s->nblock;
170 65257 60138 if (yy[0] == ll_i) {
174 283 59855 if (zPend > 0) {
177 229 365 if (zPend & 1) {
184 283 311 if (zPend < 2) break;
197 7562587 60138 while ( rll_i != rtmp ) {
212 1 20 if (zPend > 0) {
215 6 4 if (zPend & 1) {
222 1 9 if (zPend < 2) break;
268 126 21 for (t = 0; t < BZ_N_GROUPS; t++)
269 6450 126 for (v = 0; v < alphaSize; v++)
273 0 21 AssertH ( s->nMTF > 0, 3001 );
274 17 4 if (s->nMTF < 200) nGroups = 2; else
275 1 3 if (s->nMTF < 600) nGroups = 3; else
276 0 3 if (s->nMTF < 1200) nGroups = 4; else
277 0 3 if (s->nMTF < 2400) nGroups = 5; else
287 55 21 while (nPart > 0) {
291 1081 55 while (aFreq < tFreq && ge < alphaSize-1) {
1081 0 while (aFreq < tFreq && ge < alphaSize-1) {
296 53 2 if (ge > gs
297 33 20 && nPart != nGroups && nPart != 1
12 21 && nPart != nGroups && nPart != 1
298 6 6 && ((nGroups-nPart) % 2 == 1)) {
309 5252 55 for (v = 0; v < alphaSize; v++)
310 3166 2086 if (v >= gs && v <= ge)
1075 2091 if (v >= gs && v <= ge)
323 84 21 for (iter = 0; iter < BZ_N_ITERS; iter++) {
325 220 84 for (t = 0; t < nGroups; t++) fave[t] = 0;
327 220 84 for (t = 0; t < nGroups; t++)
328 21008 220 for (v = 0; v < alphaSize; v++)
335 12 72 if (nGroups == 6) {
336 3084 12 for (v = 0; v < alphaSize; v++) {
349 84 4912 if (gs >= s->nMTF) break;
351 84 4828 if (ge >= s->nMTF) ge = s->nMTF-1;
357 29092 4912 for (t = 0; t < nGroups; t++) cost[t] = 0;
359 4812 100 if (nGroups == 6 && 50 == ge-gs+1) {
4800 12 if (nGroups == 6 && 50 == ge-gs+1) {
390 3052 112 for (i = gs; i <= ge; i++) {
392 7052 3052 for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
401 29092 4912 for (t = 0; t < nGroups; t++)
402 10985 18107 if (cost[t] < bc) { bc = cost[t]; bt = t; };
411 4812 100 if (nGroups == 6 && 50 == ge-gs+1) {
4800 12 if (nGroups == 6 && 50 == ge-gs+1) {
431 3052 112 for (i = gs; i <= ge; i++)
437 0 84 if (s->verbosity >= 3) {
440 0 0 for (t = 0; t < nGroups; t++)
450 220 84 for (t = 0; t < nGroups; t++)
456 0 21 AssertH( nGroups < 8, 3002 );
457 21 0 AssertH( nSelectors < 32768 &&
0 21 AssertH( nSelectors < 32768 &&
465 55 21 for (i = 0; i < nGroups; i++) pos[i] = i;
466 1228 21 for (i = 0; i < nSelectors; i++) {
470 2913 1228 while ( ll_i != tmp ) {
482 55 21 for (t = 0; t < nGroups; t++) {
485 5252 55 for (i = 0; i < alphaSize; i++) {
486 76 5176 if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
487 134 5118 if (s->len[t][i] < minLen) minLen = s->len[t][i];
489 0 55 AssertH ( !(maxLen > 17 /*20*/ ), 3004 );
490 0 55 AssertH ( !(minLen < 1), 3005 );
498 336 21 for (i = 0; i < 16; i++) {
500 5376 336 for (j = 0; j < 16; j++)
501 1033 4343 if (s->inUse[i * 16 + j]) inUse16[i] = True;
505 336 21 for (i = 0; i < 16; i++)
506 129 207 if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
508 336 21 for (i = 0; i < 16; i++)
509 129 207 if (inUse16[i])
510 2064 129 for (j = 0; j < 16; j++) {
511 1033 1031 if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
522 1228 21 for (i = 0; i < nSelectors; i++) {
523 2913 1228 for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
532 55 21 for (t = 0; t < nGroups; t++) {
535 5252 55 for (i = 0; i < alphaSize; i++) {
536 1733 5252 while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
537 1690 5252 while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
550 21 1228 if (gs >= s->nMTF) break;
552 21 1207 if (ge >= s->nMTF) ge = s->nMTF-1;
553 0 1228 AssertH ( s->selector[selCtr] < nGroups, 3006 );
555 1203 25 if (nGroups == 6 && 50 == ge-gs+1) {
1200 3 if (nGroups == 6 && 50 == ge-gs+1) {
584 763 28 for (i = gs; i <= ge; i++) {
595 0 21 AssertH( selCtr == nSelectors, 3007 );
605 21 2 if (s->nblock > 0) {
610 0 21 if (s->blockNo > 1) s->numZ = 0;
623 21 2 if (s->blockNo == 1) {
631 21 2 if (s->nblock > 0) {
658 21 2 if (is_last_block) {