39 lines
1.6 KiB
Diff
39 lines
1.6 KiB
Diff
--- ./compress.c.orig 2005-08-12 12:02:26.000000000 +0000
|
|
+++ ./compress.c 2005-08-12 12:03:16.000000000 +0000
|
|
@@ -488,11 +488,9 @@ void sendMTFValues ( EState* s )
|
|
/*--
|
|
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 );
|
|
}
|
|
|
|
|
|
@@ -529,7 +527,7 @@ void sendMTFValues ( EState* s )
|
|
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 );
|
|
--- ./huffman.c.orig 2005-08-12 10:45:28.000000000 +0000
|
|
+++ ./huffman.c 2005-08-12 12:04:19.000000000 +0000
|
|
@@ -177,7 +177,10 @@ void BZ2_hbMakeCodeLengths ( UChar *len,
|
|
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;
|