2007-05-25 23:56:09 +02:00
|
|
|
--- compress.c
|
|
|
|
+++ compress.c
|
|
|
|
@@ -444,11 +444,9 @@
|
2006-12-19 00:15:26 +01:00
|
|
|
/*--
|
|
|
|
Recompute the tables based on the accumulated frequencies.
|
|
|
|
--*/
|
|
|
|
- /* maxLen was changed from 20 to 17 in bzip2-1.0.3. See
|
|
|
|
- comment in huffman.c for details. */
|
|
|
|
for (t = 0; t < nGroups; t++)
|
|
|
|
BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]),
|
|
|
|
- alphaSize, 17 /*20*/ );
|
|
|
|
+ alphaSize, 20 );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-05-25 23:56:09 +02:00
|
|
|
@@ -485,7 +483,7 @@
|
2006-12-19 00:15:26 +01:00
|
|
|
if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
|
|
|
|
if (s->len[t][i] < minLen) minLen = s->len[t][i];
|
|
|
|
}
|
|
|
|
- AssertH ( !(maxLen > 17 /*20*/ ), 3004 );
|
|
|
|
+ AssertH ( !(maxLen > 20), 3004 );
|
|
|
|
AssertH ( !(minLen < 1), 3005 );
|
|
|
|
BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]),
|
|
|
|
minLen, maxLen, alphaSize );
|
2007-05-25 23:56:09 +02:00
|
|
|
--- huffman.c
|
|
|
|
+++ huffman.c
|
|
|
|
@@ -137,7 +137,10 @@
|
2006-12-19 00:15:26 +01:00
|
|
|
Huffman codes with a maximum length of 17 bits. However, in
|
|
|
|
order to preserve backwards compatibility with bitstreams
|
|
|
|
produced by versions pre-1.0.3, the decompressor must still
|
|
|
|
- handle lengths of up to 20. */
|
|
|
|
+ handle lengths of up to 20.
|
|
|
|
+
|
|
|
|
+ SuSE: we changed it back to 20 to be compatible to older
|
|
|
|
+ bzip2 versions */
|
|
|
|
|
|
|
|
for (i = 1; i <= alphaSize; i++) {
|
|
|
|
j = weight[i] >> 8;
|