(int i)
| 159 | } |
| 160 | |
| 161 | private static int log2floor(int i) { |
| 162 | // REQUIRED: i > 0 |
| 163 | int result = -1; |
| 164 | int step = 16; |
| 165 | int v = i; |
| 166 | while (step > 0) { |
| 167 | int next = v >> step; |
| 168 | if (next != 0) { |
| 169 | result += step; |
| 170 | v = next; |
| 171 | } |
| 172 | step = step >> 1; |
| 173 | } |
| 174 | return result + v; |
| 175 | } |
| 176 | |
| 177 | private static int calculateDistanceAlphabetSize(int npostfix, int ndirect, int maxndistbits) { |
| 178 | return NUM_DISTANCE_SHORT_CODES + ndirect + 2 * (maxndistbits << npostfix); |
no outgoing calls
no test coverage detected