forked from pool/bzip2
This commit is contained in:
commit
47e150a6bc
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
148
bzip2-1.0.3.diff
Normal file
148
bzip2-1.0.3.diff
Normal file
@ -0,0 +1,148 @@
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -14,30 +14,47 @@
|
||||
PREFIX=/usr
|
||||
|
||||
|
||||
-OBJS= blocksort.o \
|
||||
- huffman.o \
|
||||
- crctable.o \
|
||||
- randtable.o \
|
||||
- compress.o \
|
||||
- decompress.o \
|
||||
- bzlib.o
|
||||
+OBJS= blocksort.lo \
|
||||
+ huffman.lo \
|
||||
+ crctable.lo \
|
||||
+ randtable.lo \
|
||||
+ compress.lo \
|
||||
+ decompress.lo \
|
||||
+ bzlib.lo
|
||||
+
|
||||
+LIB= libbz2.la
|
||||
+
|
||||
+prefix= /usr
|
||||
+bindir= $(prefix)/bin
|
||||
+libdir= $(prefix)/lib
|
||||
+mandir= $(prefix)/share/man
|
||||
+includedir= $(prefix)/include
|
||||
+
|
||||
+all: $(LIB) bzip2 bzip2recover test
|
||||
+
|
||||
+install: all test
|
||||
+ mkdir -p $(PREFIX)$(bindir)
|
||||
+ libtool --mode=install install -m 0755 bzip2 bzip2recover $(PREFIX)$(bindir)
|
||||
+ ln -sf bzip2 $(PREFIX)$(bindir)/bunzip2
|
||||
+ ln -sf bzip2 $(PREFIX)$(bindir)/bzcat
|
||||
+ mkdir -p $(PREFIX)$(mandir)/man1
|
||||
+ install -c -m 0644 bzip2.1 $(PREFIX)$(mandir)/man1/bzip2.1
|
||||
+ ln -sf bzip2.1 $(PREFIX)$(mandir)/man1/bunzip2.1
|
||||
+ ln -sf bzip2.1 $(PREFIX)$(mandir)/man1/bzcat.1
|
||||
+ mkdir -p $(PREFIX)$(libdir)
|
||||
+ libtool --mode=install install $(LIB) $(PREFIX)$(libdir)
|
||||
+ mkdir -p $(PREFIX)$(includedir)
|
||||
+ install -c -m 0644 bzlib.h $(PREFIX)$(includedir)
|
||||
|
||||
-all: libbz2.a bzip2 bzip2recover test
|
||||
-
|
||||
-bzip2: libbz2.a bzip2.o
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
|
||||
+bzip2: bzip2.o $(LIB)
|
||||
+ libtool --mode=link $(CC) $(CFLAGS) -o $@ bzip2.o $(LIB)
|
||||
|
||||
bzip2recover: bzip2recover.o
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
|
||||
+ libtool --mode=link $(CC) $(CFLAGS) -o $@ bzip2recover.o
|
||||
|
||||
-libbz2.a: $(OBJS)
|
||||
- rm -f libbz2.a
|
||||
- $(AR) cq libbz2.a $(OBJS)
|
||||
- @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
|
||||
- -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \
|
||||
- echo $(RANLIB) libbz2.a ; \
|
||||
- $(RANLIB) libbz2.a ; \
|
||||
- fi
|
||||
+$(LIB): $(OBJS)
|
||||
+ libtool --mode=link $(CC) $(CFLAGS) -o $@ $(OBJS) -rpath $(libdir) \
|
||||
+ -version-info 1:0:0
|
||||
|
||||
check: test
|
||||
test: bzip2
|
||||
@@ -56,70 +73,18 @@
|
||||
cmp sample3.tst sample3.ref
|
||||
@cat words3
|
||||
|
||||
-install: bzip2 bzip2recover
|
||||
- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
|
||||
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
|
||||
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
|
||||
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
|
||||
- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
|
||||
- cp -f bzip2 $(PREFIX)/bin/bzip2
|
||||
- cp -f bzip2 $(PREFIX)/bin/bunzip2
|
||||
- cp -f bzip2 $(PREFIX)/bin/bzcat
|
||||
- cp -f bzip2recover $(PREFIX)/bin/bzip2recover
|
||||
- chmod a+x $(PREFIX)/bin/bzip2
|
||||
- chmod a+x $(PREFIX)/bin/bunzip2
|
||||
- chmod a+x $(PREFIX)/bin/bzcat
|
||||
- chmod a+x $(PREFIX)/bin/bzip2recover
|
||||
- cp -f bzip2.1 $(PREFIX)/man/man1
|
||||
- chmod a+r $(PREFIX)/man/man1/bzip2.1
|
||||
- cp -f bzlib.h $(PREFIX)/include
|
||||
- chmod a+r $(PREFIX)/include/bzlib.h
|
||||
- cp -f libbz2.a $(PREFIX)/lib
|
||||
- chmod a+r $(PREFIX)/lib/libbz2.a
|
||||
- cp -f bzgrep $(PREFIX)/bin/bzgrep
|
||||
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
|
||||
- ln $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
|
||||
- chmod a+x $(PREFIX)/bin/bzgrep
|
||||
- cp -f bzmore $(PREFIX)/bin/bzmore
|
||||
- ln $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
|
||||
- chmod a+x $(PREFIX)/bin/bzmore
|
||||
- cp -f bzdiff $(PREFIX)/bin/bzdiff
|
||||
- ln $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
|
||||
- chmod a+x $(PREFIX)/bin/bzdiff
|
||||
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
|
||||
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
|
||||
- chmod a+r $(PREFIX)/man/man1/bzmore.1
|
||||
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
|
||||
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
|
||||
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
|
||||
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
|
||||
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
|
||||
-
|
||||
clean:
|
||||
- rm -f *.o libbz2.a bzip2 bzip2recover \
|
||||
+ rm -f *.o *.a $(LIB) bzip2 bzip2recover \
|
||||
sample1.rb2 sample2.rb2 sample3.rb2 \
|
||||
sample1.tst sample2.tst sample3.tst
|
||||
|
||||
-blocksort.o: blocksort.c
|
||||
- @cat words0
|
||||
- $(CC) $(CFLAGS) -c blocksort.c
|
||||
-huffman.o: huffman.c
|
||||
- $(CC) $(CFLAGS) -c huffman.c
|
||||
-crctable.o: crctable.c
|
||||
- $(CC) $(CFLAGS) -c crctable.c
|
||||
-randtable.o: randtable.c
|
||||
- $(CC) $(CFLAGS) -c randtable.c
|
||||
-compress.o: compress.c
|
||||
- $(CC) $(CFLAGS) -c compress.c
|
||||
-decompress.o: decompress.c
|
||||
- $(CC) $(CFLAGS) -c decompress.c
|
||||
-bzlib.o: bzlib.c
|
||||
- $(CC) $(CFLAGS) -c bzlib.c
|
||||
-bzip2.o: bzip2.c
|
||||
- $(CC) $(CFLAGS) -c bzip2.c
|
||||
-bzip2recover.o: bzip2recover.c
|
||||
- $(CC) $(CFLAGS) -c bzip2recover.c
|
||||
+.SUFFIXES: .c .o .lo
|
||||
+
|
||||
+%.o: %.c bzlib.h bzlib_private.h
|
||||
+ $(CC) $(CFLAGS) -c $<
|
||||
|
||||
+%.lo: %.c bzlib.h bzlib_private.h
|
||||
+ libtool --mode=compile $(CC) $(CFLAGS) -c $<
|
||||
|
||||
distclean: clean
|
||||
rm -f manual.ps manual.html manual.pdf
|
3
bzip2-1.0.3.tar.gz
Normal file
3
bzip2-1.0.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4aaa8e7b4ecf03d91c33e8bf92d489533fa6c1f99e825c34058003f18eb68c13
|
||||
size 669075
|
250
bzip2-faster.diff
Normal file
250
bzip2-faster.diff
Normal file
@ -0,0 +1,250 @@
|
||||
--- ./bzlib_private.h.orig 2005-08-12 10:40:07.000000000 +0000
|
||||
+++ ./bzlib_private.h 2005-08-12 10:50:02.000000000 +0000
|
||||
@@ -374,6 +374,7 @@ BZ2_hbMakeCodeLengths ( UChar*, Int32*,
|
||||
#define MTFA_SIZE 4096
|
||||
#define MTFL_SIZE 16
|
||||
|
||||
+#define HUFCODE_SIZE 10
|
||||
|
||||
|
||||
/*-- Structure holding all the decompression-side stuff. --*/
|
||||
@@ -441,6 +442,7 @@ typedef
|
||||
Int32 base [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||
Int32 perm [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
|
||||
Int32 minLens[BZ_N_GROUPS];
|
||||
+ Int16 hufcode[BZ_N_GROUPS][1 << HUFCODE_SIZE];
|
||||
|
||||
/* save area for scalars in the main decompress code */
|
||||
Int32 save_i;
|
||||
@@ -467,6 +469,7 @@ typedef
|
||||
Int32* save_gLimit;
|
||||
Int32* save_gBase;
|
||||
Int32* save_gPerm;
|
||||
+ Int16* save_gHufCode;
|
||||
|
||||
}
|
||||
DState;
|
||||
@@ -516,8 +519,8 @@ extern Int32
|
||||
BZ2_decompress ( DState* );
|
||||
|
||||
extern void
|
||||
-BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
|
||||
- Int32, Int32, Int32 );
|
||||
+BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, Int16 *,
|
||||
+ UChar*, Int32, Int32, Int32 );
|
||||
|
||||
|
||||
#endif
|
||||
--- ./decompress.c.orig 2005-08-12 10:27:55.000000000 +0000
|
||||
+++ ./decompress.c 2005-08-12 12:08:14.188288783 +0000
|
||||
@@ -104,6 +104,9 @@ void makeMaps_d ( DState* s )
|
||||
s->strm->total_in_hi32++; \
|
||||
}
|
||||
|
||||
+#define UNGET_BITS(nnn) \
|
||||
+ s->bsLive += nnn
|
||||
+
|
||||
#define GET_UCHAR(lll,uuu) \
|
||||
GET_BITS(lll,uuu,8)
|
||||
|
||||
@@ -123,23 +126,29 @@ void makeMaps_d ( DState* s )
|
||||
gLimit = &(s->limit[gSel][0]); \
|
||||
gPerm = &(s->perm[gSel][0]); \
|
||||
gBase = &(s->base[gSel][0]); \
|
||||
+ gHufCode = &(s->hufcode[gSel][0]); \
|
||||
} \
|
||||
groupPos--; \
|
||||
- zn = gMinlen; \
|
||||
+ zn = HUFCODE_SIZE; \
|
||||
GET_BITS(label1, zvec, zn); \
|
||||
- while (1) { \
|
||||
- if (zn > 20 /* the longest code */) \
|
||||
- RETURN(BZ_DATA_ERROR); \
|
||||
- if (zvec <= gLimit[zn]) break; \
|
||||
- zn++; \
|
||||
- GET_BIT(label2, zj); \
|
||||
- zvec = (zvec << 1) | zj; \
|
||||
- }; \
|
||||
- if (zvec - gBase[zn] < 0 \
|
||||
+ if (gHufCode[zvec]) { \
|
||||
+ UNGET_BITS(gHufCode[zvec] >> 10); \
|
||||
+ lval = gHufCode[zvec] & 511; \
|
||||
+ } else { \
|
||||
+ while (1) { \
|
||||
+ if (zn > 20 /* the longest code */) \
|
||||
+ RETURN(BZ_DATA_ERROR); \
|
||||
+ if (zvec <= gLimit[zn]) break; \
|
||||
+ zn++; \
|
||||
+ GET_BIT(label2, zj); \
|
||||
+ zvec = (zvec << 1) | zj; \
|
||||
+ }; \
|
||||
+ if (zvec - gBase[zn] < 0 \
|
||||
|| zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE) \
|
||||
- RETURN(BZ_DATA_ERROR); \
|
||||
- lval = gPerm[zvec - gBase[zn]]; \
|
||||
-}
|
||||
+ RETURN(BZ_DATA_ERROR); \
|
||||
+ lval = gPerm[zvec - gBase[zn]]; \
|
||||
+ } \
|
||||
+} \
|
||||
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
@@ -175,6 +184,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
Int32* gLimit;
|
||||
Int32* gBase;
|
||||
Int32* gPerm;
|
||||
+ Int16* gHufCode;
|
||||
|
||||
if (s->state == BZ_X_MAGIC_1) {
|
||||
/*initialise the save area*/
|
||||
@@ -202,6 +212,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
s->save_gLimit = NULL;
|
||||
s->save_gBase = NULL;
|
||||
s->save_gPerm = NULL;
|
||||
+ s->save_gHufCode = NULL;
|
||||
}
|
||||
|
||||
/*restore from the save area*/
|
||||
@@ -229,6 +240,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
gLimit = s->save_gLimit;
|
||||
gBase = s->save_gBase;
|
||||
gPerm = s->save_gPerm;
|
||||
+ gHufCode = s->save_gHufCode;
|
||||
|
||||
retVal = BZ_OK;
|
||||
|
||||
@@ -380,6 +392,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
&(s->limit[t][0]),
|
||||
&(s->base[t][0]),
|
||||
&(s->perm[t][0]),
|
||||
+ &(s->hufcode[t][0]),
|
||||
&(s->len[t][0]),
|
||||
minLen, maxLen, alphaSize
|
||||
);
|
||||
@@ -454,6 +467,62 @@ Int32 BZ2_decompress ( DState* s )
|
||||
if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
|
||||
|
||||
/*-- uc = MTF ( nextSym-1 ) --*/
|
||||
+#if MTFL_SIZE == 16
|
||||
+ {
|
||||
+ unsigned char *ppx = s->mtfa + s->mtfbase[0];
|
||||
+ int lno = 0;
|
||||
+
|
||||
+ nextSym--;
|
||||
+ if (nextSym >= MTFL_SIZE) {
|
||||
+ lno = nextSym / MTFL_SIZE;
|
||||
+ nextSym %= MTFL_SIZE;
|
||||
+ ppx = s->mtfa + s->mtfbase[lno];
|
||||
+ }
|
||||
+ uc = ppx[nextSym];
|
||||
+ switch(nextSym) {
|
||||
+ case 9: ppx[9] = ppx[10];
|
||||
+ case 10: ppx[10] = ppx[11];
|
||||
+ case 11: ppx[11] = ppx[12];
|
||||
+ case 12: ppx[12] = ppx[13];
|
||||
+ case 13: ppx[13] = ppx[14];
|
||||
+ case 14: ppx[14] = ppx[15];
|
||||
+ case 15: goto copy;
|
||||
+
|
||||
+ case 8: ppx[8] = ppx[7];
|
||||
+ case 7: ppx[7] = ppx[6];
|
||||
+ case 6: ppx[6] = ppx[5];
|
||||
+ case 5: ppx[5] = ppx[4];
|
||||
+ case 4: ppx[4] = ppx[3];
|
||||
+ case 3: ppx[3] = ppx[2];
|
||||
+ case 2: ppx[2] = ppx[1];
|
||||
+ case 1: ppx[1] = ppx[0];
|
||||
+ default: break;
|
||||
+ }
|
||||
+ if (lno) {
|
||||
+ s->mtfbase[lno]++;
|
||||
+ copy:
|
||||
+ while (lno > 0) {
|
||||
+ s->mtfbase[lno]--;
|
||||
+ s->mtfa[s->mtfbase[lno]] = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1];
|
||||
+ lno--;
|
||||
+ }
|
||||
+ s->mtfbase[0]--;
|
||||
+ if (s->mtfbase[0] == 0) {
|
||||
+ int ii, jj, kk;
|
||||
+ s->mtfa[0] = uc;
|
||||
+ kk = MTFA_SIZE-1;
|
||||
+ for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
|
||||
+ for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
|
||||
+ s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
|
||||
+ kk--;
|
||||
+ }
|
||||
+ s->mtfbase[ii] = kk + 1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ s->mtfa[s->mtfbase[0]] = uc;
|
||||
+ }
|
||||
+#else
|
||||
{
|
||||
Int32 ii, jj, kk, pp, lno, off;
|
||||
UInt32 nn;
|
||||
@@ -505,6 +574,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
}
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
/*-- end uc = MTF ( nextSym-1 ) --*/
|
||||
|
||||
s->unzftab[s->seqToUnseq[uc]]++;
|
||||
@@ -656,6 +726,7 @@ Int32 BZ2_decompress ( DState* s )
|
||||
s->save_gLimit = gLimit;
|
||||
s->save_gBase = gBase;
|
||||
s->save_gPerm = gPerm;
|
||||
+ s->save_gHufCode = gHufCode;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
--- ./huffman.c.orig 2005-08-12 10:45:28.000000000 +0000
|
||||
+++ ./huffman.c 2005-08-12 12:04:19.000000000 +0000
|
||||
@@ -210,13 +213,16 @@ void BZ2_hbAssignCodes ( Int32 *code,
|
||||
void BZ2_hbCreateDecodeTables ( Int32 *limit,
|
||||
Int32 *base,
|
||||
Int32 *perm,
|
||||
+ Int16 *hufcode,
|
||||
UChar *length,
|
||||
Int32 minLen,
|
||||
Int32 maxLen,
|
||||
Int32 alphaSize )
|
||||
{
|
||||
- Int32 pp, i, j, vec;
|
||||
+ Int32 pp, i, j, vec, k, vec2;
|
||||
|
||||
+ for (i = 0; i < (1 << HUFCODE_SIZE); i++)
|
||||
+ hufcode[i] = 0;
|
||||
pp = 0;
|
||||
for (i = minLen; i <= maxLen; i++)
|
||||
for (j = 0; j < alphaSize; j++)
|
||||
@@ -227,16 +233,25 @@ void BZ2_hbCreateDecodeTables ( Int32 *l
|
||||
|
||||
for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
|
||||
|
||||
- for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
|
||||
+ for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = -1;
|
||||
vec = 0;
|
||||
|
||||
for (i = minLen; i <= maxLen; i++) {
|
||||
+ if (i <= HUFCODE_SIZE) {
|
||||
+ for (j = base[i]; j < base[i + 1]; j++) {
|
||||
+ vec2 = (vec + j - base[i]) << (HUFCODE_SIZE - i);
|
||||
+ for (k = (1 << (HUFCODE_SIZE - i)) ; --k >= 0; vec2++)
|
||||
+ hufcode[vec2] = perm[j] | 512 | (HUFCODE_SIZE - i) << 10;
|
||||
+ }
|
||||
+ }
|
||||
vec += (base[i+1] - base[i]);
|
||||
limit[i] = vec-1;
|
||||
vec <<= 1;
|
||||
}
|
||||
for (i = minLen + 1; i <= maxLen; i++)
|
||||
base[i] = ((limit[i-1] + 1) << 1) - base[i];
|
||||
+ limit[maxLen + 1] = 0x7fffffff; /* make it terminate */
|
||||
+ base[maxLen + 1] = 0;
|
||||
}
|
||||
|
||||
|
38
bzip2-maxlen20.diff
Normal file
38
bzip2-maxlen20.diff
Normal file
@ -0,0 +1,38 @@
|
||||
--- ./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;
|
154
bzip2.changes
Normal file
154
bzip2.changes
Normal file
@ -0,0 +1,154 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 16 12:15:05 CEST 2006 - dmueller@suse.de
|
||||
|
||||
- strip .la files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 25 21:30:02 CET 2006 - mls@suse.de
|
||||
|
||||
- converted neededforbuild to BuildRequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 17 23:42:23 CET 2006 - schwab@suse.de
|
||||
|
||||
- Don't strip binaries.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 12 14:18:28 CEST 2005 - mls@suse.de
|
||||
|
||||
- make decompress much faster
|
||||
- compile with -O3
|
||||
- go back to maxlen=20 when compressing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 5 01:04:15 CEST 2005 - ro@suse.de
|
||||
|
||||
- next libdir: only package lib*
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 5 00:14:47 CEST 2005 - ro@suse.de
|
||||
|
||||
- do not package all of libdir (debuginfo)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 1 17:20:37 CEST 2005 - mjancar@suse.cz
|
||||
|
||||
- update to 1.0.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 28 17:59:41 CEST 2005 - kukuk@suse.de
|
||||
|
||||
- Move shared libraries to /%{_lib}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 24 14:13:05 CET 2005 - werner@suse.de
|
||||
|
||||
- Add bznew, a changeed version of the gzip znew.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 20 09:12:22 CEST 2004 - mmj@suse.de
|
||||
|
||||
- Fix strict aliasing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jan 11 10:14:36 CET 2004 - adrian@suse.de
|
||||
|
||||
- add %defattr and %run_ldconfig
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 23 19:52:00 CEST 2003 - tcrhak@suse.cz
|
||||
|
||||
- fixed URL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 23 19:29:34 CEST 2002 - tcrhak@suse.cz
|
||||
|
||||
- renamed to bzip2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 5 19:21:21 CET 2002 - tcrhak@suse.cz
|
||||
|
||||
- update to version 1.0.2
|
||||
- bziped tarball
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 8 15:39:23 CET 2001 - nadvornik@suse.cz
|
||||
|
||||
- re-added /usr/include/bzlib.h
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 8 12:02:58 CET 2001 - bk@suse.de
|
||||
|
||||
- Replaced the -malign options with -mcpu=pentiumpro
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 6 22:08:52 CET 2001 - bk@suse.de
|
||||
|
||||
- add version info to libbz2 link to fix the library version number
|
||||
- if i386, add -malign-loops=2 -malign-jumps=2 -malign-functions=2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 30 14:38:26 CET 2000 - aj@suse.de
|
||||
|
||||
- New version, compile with LFS support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 3 20:52:10 CEST 2000 - kukuk@suse.de
|
||||
|
||||
- Set libdir for 64bit architectures
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 22 10:55:31 CEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- update to 1.0.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 26 15:06:40 MEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- changed Group
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 10 10:18:22 CEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- added URL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 4 12:05:42 CEST 2000 - nadvornik@suse.cz
|
||||
|
||||
- fixed to compile
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 3 18:34:38 CEST 2000 - bk@suse.de
|
||||
|
||||
- added libbz2 shared library support for s390
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 2 10:19:10 MET 2000 - fehr@suse.de
|
||||
|
||||
- moved man pages to /usr/share/man
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
|
||||
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 13 11:20:20 MEST 1999 - fehr@suse.de
|
||||
|
||||
- update to 0.9.5d
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 1 16:53:06 MEST 1999 - ro@suse.de
|
||||
|
||||
- update to 0.9.0c
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 18 10:28:19 MEST 1998 - ro@suse.de
|
||||
|
||||
- update to 0.9.0b (including libbz2 and bzlib.h)
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Thu Oct 30 19:11:36 CET 1997 - fehr@suse.de
|
||||
|
||||
- add bzip package to S.u.S.E. distribution
|
||||
|
142
bzip2.spec
Normal file
142
bzip2.spec
Normal file
@ -0,0 +1,142 @@
|
||||
#
|
||||
# spec file for package bzip2 (Version 1.0.3)
|
||||
#
|
||||
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
Name: bzip2
|
||||
Version: 1.0.3
|
||||
Release: 26
|
||||
Provides: bzip
|
||||
Obsoletes: bzip
|
||||
Autoreqprov: on
|
||||
Group: Productivity/Archiving/Compression
|
||||
License: Other License(s), see package
|
||||
URL: http://www.bzip.org/
|
||||
Summary: A Program for Compressing Files
|
||||
Source: bzip2-%{version}.tar.gz
|
||||
Source1: bznew.gz
|
||||
Source2: bznew.1.gz
|
||||
Patch: bzip2-%{version}.diff
|
||||
Patch2: bzip2-maxlen20.diff
|
||||
Patch3: bzip2-faster.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
bzip is a very powerful program for compressing files.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Julian Seward <jseward@acm.org>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch
|
||||
%patch2
|
||||
%patch3
|
||||
|
||||
%build
|
||||
# -O3 really makes a difference
|
||||
RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-O2/-O3}
|
||||
make CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -Wall -Winline" libdir=%{_libdir}
|
||||
|
||||
%install
|
||||
make PREFIX=$RPM_BUILD_ROOT install libdir=%{_libdir}
|
||||
gzip -9 manual.ps
|
||||
gzip -dc %{SOURCE1} > bznew
|
||||
install -m 755 bznew $RPM_BUILD_ROOT%{_bindir}/
|
||||
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/
|
||||
install -m 755 -d $RPM_BUILD_ROOT/%{_lib}/
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
|
||||
mv $RPM_BUILD_ROOT%{_libdir}/libbz2.so.* $RPM_BUILD_ROOT/%{_lib}/
|
||||
ln -sf ../../%{_lib}/libbz2.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README LICENSE CHANGES manual.ps.gz manual*.html
|
||||
%doc %{_mandir}/man?/*
|
||||
/%{_lib}/lib*
|
||||
%{_libdir}/lib*
|
||||
%{_includedir}/*
|
||||
%{_bindir}/*
|
||||
|
||||
%changelog -n bzip2
|
||||
* Mon Oct 16 2006 - dmueller@suse.de
|
||||
- strip .la files
|
||||
* Wed Jan 25 2006 - mls@suse.de
|
||||
- converted neededforbuild to BuildRequires
|
||||
* Tue Jan 17 2006 - schwab@suse.de
|
||||
- Don't strip binaries.
|
||||
* Fri Aug 12 2005 - mls@suse.de
|
||||
- make decompress much faster
|
||||
- compile with -O3
|
||||
- go back to maxlen=20 when compressing
|
||||
* Fri Aug 05 2005 - ro@suse.de
|
||||
- next libdir: only package lib*
|
||||
* Fri Aug 05 2005 - ro@suse.de
|
||||
- do not package all of libdir (debuginfo)
|
||||
* Mon Aug 01 2005 - mjancar@suse.cz
|
||||
- update to 1.0.3
|
||||
* Tue Jun 28 2005 - kukuk@suse.de
|
||||
- Move shared libraries to /%%{_lib}
|
||||
* Thu Mar 24 2005 - werner@suse.de
|
||||
- Add bznew, a changeed version of the gzip znew.
|
||||
* Tue Apr 20 2004 - mmj@suse.de
|
||||
- Fix strict aliasing
|
||||
* Sun Jan 11 2004 - adrian@suse.de
|
||||
- add %%defattr and %%run_ldconfig
|
||||
* Wed Jul 23 2003 - tcrhak@suse.cz
|
||||
- fixed URL
|
||||
* Tue Jul 23 2002 - tcrhak@suse.cz
|
||||
- renamed to bzip2
|
||||
* Tue Feb 05 2002 - tcrhak@suse.cz
|
||||
- update to version 1.0.2
|
||||
- bziped tarball
|
||||
* Thu Mar 08 2001 - nadvornik@suse.cz
|
||||
- re-added /usr/include/bzlib.h
|
||||
* Thu Mar 08 2001 - bk@suse.de
|
||||
- Replaced the -malign options with -mcpu=pentiumpro
|
||||
* Tue Mar 06 2001 - bk@suse.de
|
||||
- add version info to libbz2 link to fix the library version number
|
||||
- if i386, add -malign-loops=2 -malign-jumps=2 -malign-functions=2
|
||||
* Thu Nov 30 2000 - aj@suse.de
|
||||
- New version, compile with LFS support.
|
||||
* Tue Oct 03 2000 - kukuk@suse.de
|
||||
- Set libdir for 64bit architectures
|
||||
* Mon May 22 2000 - nadvornik@suse.cz
|
||||
- update to 1.0.0
|
||||
* Wed Apr 26 2000 - nadvornik@suse.cz
|
||||
- changed Group
|
||||
* Mon Apr 10 2000 - nadvornik@suse.cz
|
||||
- added URL
|
||||
* Tue Apr 04 2000 - nadvornik@suse.cz
|
||||
- fixed to compile
|
||||
* Mon Apr 03 2000 - bk@suse.de
|
||||
- added libbz2 shared library support for s390
|
||||
* Thu Mar 02 2000 - fehr@suse.de
|
||||
- moved man pages to /usr/share/man
|
||||
* Mon Sep 13 1999 - bs@suse.de
|
||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
||||
* Mon Sep 13 1999 - fehr@suse.de
|
||||
- update to 0.9.5d
|
||||
* Thu Jul 01 1999 - ro@suse.de
|
||||
- update to 0.9.0c
|
||||
* Fri Sep 18 1998 - ro@suse.de
|
||||
- update to 0.9.0b (including libbz2 and bzlib.h)
|
||||
* Thu Oct 30 1997 - fehr@suse.de
|
||||
- add bzip package to S.u.S.E. distribution
|
3
bznew.1.gz
Normal file
3
bznew.1.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8da14768db0fb6c6cf3caa5340dc4f5bcc051ce3f15d617b1ca7f677a90f6aaa
|
||||
size 538
|
3
bznew.gz
Normal file
3
bznew.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:823dfb8f2b98ecb48c3654a10b6efbab5e1f962cef2aa13627dd8935ec76a934
|
||||
size 1379
|
Loading…
Reference in New Issue
Block a user