Branch Coverage

huffman.c
Criterion Covered Total %
branch 60 66 90.9


line true false branch
79 21008 220 for (i = 0; i < alphaSize; i++)
80 18784 2224 weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
91 21008 220 for (i = 1; i <= alphaSize; i++) {
95 16609 21008 UPHEAP(nHeap);
98 0 220 AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 );
100 20788 220 while (nHeap > 1) {
101 19510 108514 n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
107155 1359 n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
48467 58688 n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
1278 107236 n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
102 16565 106850 n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
105612 1238 n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
47518 58094 n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
4223 102627 n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
109 1026 20788 UPHEAP(nHeap);
112 0 220 AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 );
115 21008 220 for (i = 1; i <= alphaSize; i++) {
118 162475 21008 while (parent[k] >= 0) { k = parent[k]; j++; }
120 0 21008 if (j > maxLen) tooLong = True;
123 220 0 if (! tooLong) break;
142 0 0 for (i = 1; i <= alphaSize; i++) {
161 187 55 for (n = minLen; n <= maxLen; n++) {
162 24326 187 for (i = 0; i < alphaSize; i++)
163 5252 19074 if (length[i] == n) { code[i] = vec; vec++; };
181 293 81 for (i = minLen; i <= maxLen; i++)
182 34599 293 for (j = 0; j < alphaSize; j++)
183 7154 27445 if (length[j] == i) { perm[pp] = j; pp++; };
185 1863 81 for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0;
186 7154 81 for (i = 0; i < alphaSize; i++) base[length[i]+1]++;
188 1782 81 for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
190 1863 81 for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
193 293 81 for (i = minLen; i <= maxLen; i++) {
198 212 81 for (i = minLen + 1; i <= maxLen; i++)