I'm no expert on BZip compression, so my changes are relatively minor e.g.
for (i = 0; i < MAX_CODE_LEN; i++) { base[i] = 0; } for (i = 0; i < alphaSize; i++) { base[length[i] + 1]++; }
for (i = 1; i < MAX_CODE_LEN; i++) { base[i] += base[i - 1]; }
for (i = 0; i < MAX_CODE_LEN; i++) {
limit[i] = 0; <-- this could be moved into the first for loop without impacting the code
}
Indeed since all new int values are initialized as 0
for (i = 0; i < MAX_CODE_LEN; i++) { base[i] = 0; }
and
base[i] = new base[MAX_CODE_LEN]
should be equivalent shouldn't they?
Kev
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]