aboutsummaryrefslogtreecommitdiff
path: root/archival/libarchive/bz
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-09-10 13:25:57 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-09-10 13:25:57 +0200
commit522041ee7b10ac544b90c6a8d1d4fbf8a5d39c6d (patch)
tree412854af83f841f564faf842ca6cefc12a016236 /archival/libarchive/bz
parent202a1b9284fd763e81340050d228103aef999675 (diff)
downloadbusybox-w32-522041ee7b10ac544b90c6a8d1d4fbf8a5d39c6d.tar.gz
busybox-w32-522041ee7b10ac544b90c6a8d1d4fbf8a5d39c6d.tar.bz2
busybox-w32-522041ee7b10ac544b90c6a8d1d4fbf8a5d39c6d.zip
regularize options which control size/speed trade
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive/bz')
-rw-r--r--archival/libarchive/bz/blocksort.c8
-rw-r--r--archival/libarchive/bz/bzlib_private.h2
-rw-r--r--archival/libarchive/bz/compress.c8
-rw-r--r--archival/libarchive/bz/huffman.c2
4 files changed, 10 insertions, 10 deletions
diff --git a/archival/libarchive/bz/blocksort.c b/archival/libarchive/bz/blocksort.c
index f70c3701d..e600cb7a7 100644
--- a/archival/libarchive/bz/blocksort.c
+++ b/archival/libarchive/bz/blocksort.c
@@ -385,7 +385,7 @@ int mainGtU(
385 * but speeds up compression 10% overall 385 * but speeds up compression 10% overall
386 */ 386 */
387 387
388#if CONFIG_BZIP2_FEATURE_SPEED >= 1 388#if CONFIG_BZIP2_FAST >= 1
389 389
390#define TIMES_8(code) \ 390#define TIMES_8(code) \
391 code; code; code; code; \ 391 code; code; code; code; \
@@ -496,7 +496,7 @@ void mainSimpleSort(uint32_t* ptr,
496 i++; 496 i++;
497 497
498/* 1.5% overall speedup, +290 bytes */ 498/* 1.5% overall speedup, +290 bytes */
499#if CONFIG_BZIP2_FEATURE_SPEED >= 3 499#if CONFIG_BZIP2_FAST >= 3
500 /*-- copy 2 --*/ 500 /*-- copy 2 --*/
501 if (i > hi) break; 501 if (i > hi) break;
502 v = ptr[i]; 502 v = ptr[i];
@@ -750,7 +750,7 @@ void mainSort(EState* state,
750 j = block[0] << 8; 750 j = block[0] << 8;
751 i = nblock - 1; 751 i = nblock - 1;
752/* 3%, +300 bytes */ 752/* 3%, +300 bytes */
753#if CONFIG_BZIP2_FEATURE_SPEED >= 2 753#if CONFIG_BZIP2_FAST >= 2
754 for (; i >= 3; i -= 4) { 754 for (; i >= 3; i -= 4) {
755 quadrant[i] = 0; 755 quadrant[i] = 0;
756 j = (j >> 8) | (((uint16_t)block[i]) << 8); 756 j = (j >> 8) | (((uint16_t)block[i]) << 8);
@@ -787,7 +787,7 @@ void mainSort(EState* state,
787 787
788 s = block[0] << 8; 788 s = block[0] << 8;
789 i = nblock - 1; 789 i = nblock - 1;
790#if CONFIG_BZIP2_FEATURE_SPEED >= 2 790#if CONFIG_BZIP2_FAST >= 2
791 for (; i >= 3; i -= 4) { 791 for (; i >= 3; i -= 4) {
792 s = (s >> 8) | (block[i] << 8); 792 s = (s >> 8) | (block[i] << 8);
793 j = ftab[s] - 1; 793 j = ftab[s] - 1;
diff --git a/archival/libarchive/bz/bzlib_private.h b/archival/libarchive/bz/bzlib_private.h
index 6430ce407..43e674bec 100644
--- a/archival/libarchive/bz/bzlib_private.h
+++ b/archival/libarchive/bz/bzlib_private.h
@@ -183,7 +183,7 @@ typedef struct EState {
183 /* stack-saving measures: these can be local, but they are too big */ 183 /* stack-saving measures: these can be local, but they are too big */
184 int32_t sendMTFValues__code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; 184 int32_t sendMTFValues__code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
185 int32_t sendMTFValues__rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; 185 int32_t sendMTFValues__rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
186#if CONFIG_BZIP2_FEATURE_SPEED >= 5 186#if CONFIG_BZIP2_FAST >= 5
187 /* second dimension: only 3 needed; 4 makes index calculations faster */ 187 /* second dimension: only 3 needed; 4 makes index calculations faster */
188 uint32_t sendMTFValues__len_pack[BZ_MAX_ALPHA_SIZE][4]; 188 uint32_t sendMTFValues__len_pack[BZ_MAX_ALPHA_SIZE][4];
189#endif 189#endif
diff --git a/archival/libarchive/bz/compress.c b/archival/libarchive/bz/compress.c
index f93671742..e9f1afdaf 100644
--- a/archival/libarchive/bz/compress.c
+++ b/archival/libarchive/bz/compress.c
@@ -61,7 +61,7 @@ void bsFinishWrite(EState* s)
61/*---------------------------------------------------*/ 61/*---------------------------------------------------*/
62static 62static
63/* Helps only on level 5, on other levels hurts. ? */ 63/* Helps only on level 5, on other levels hurts. ? */
64#if CONFIG_BZIP2_FEATURE_SPEED >= 5 64#if CONFIG_BZIP2_FAST >= 5
65ALWAYS_INLINE 65ALWAYS_INLINE
66#endif 66#endif
67void bsW(EState* s, int32_t n, uint32_t v) 67void bsW(EState* s, int32_t n, uint32_t v)
@@ -331,7 +331,7 @@ void sendMTFValues(EState* s)
331 for (v = 0; v < alphaSize; v++) 331 for (v = 0; v < alphaSize; v++)
332 s->rfreq[t][v] = 0; 332 s->rfreq[t][v] = 0;
333 333
334#if CONFIG_BZIP2_FEATURE_SPEED >= 5 334#if CONFIG_BZIP2_FAST >= 5
335 /* 335 /*
336 * Set up an auxiliary length table which is used to fast-track 336 * Set up an auxiliary length table which is used to fast-track
337 * the common case (nGroups == 6). 337 * the common case (nGroups == 6).
@@ -361,7 +361,7 @@ void sendMTFValues(EState* s)
361 */ 361 */
362 for (t = 0; t < nGroups; t++) 362 for (t = 0; t < nGroups; t++)
363 cost[t] = 0; 363 cost[t] = 0;
364#if CONFIG_BZIP2_FEATURE_SPEED >= 5 364#if CONFIG_BZIP2_FAST >= 5
365 if (nGroups == 6 && 50 == ge-gs+1) { 365 if (nGroups == 6 && 50 == ge-gs+1) {
366 /*--- fast track the common case ---*/ 366 /*--- fast track the common case ---*/
367 register uint32_t cost01, cost23, cost45; 367 register uint32_t cost01, cost23, cost45;
@@ -420,7 +420,7 @@ void sendMTFValues(EState* s)
420 * Increment the symbol frequencies for the selected table. 420 * Increment the symbol frequencies for the selected table.
421 */ 421 */
422/* 1% faster compress. +800 bytes */ 422/* 1% faster compress. +800 bytes */
423#if CONFIG_BZIP2_FEATURE_SPEED >= 4 423#if CONFIG_BZIP2_FAST >= 4
424 if (nGroups == 6 && 50 == ge-gs+1) { 424 if (nGroups == 6 && 50 == ge-gs+1) {
425 /*--- fast track the common case ---*/ 425 /*--- fast track the common case ---*/
426#define BZ_ITUR(nn) s->rfreq[bt][mtfv[gs + (nn)]]++ 426#define BZ_ITUR(nn) s->rfreq[bt][mtfv[gs + (nn)]]++
diff --git a/archival/libarchive/bz/huffman.c b/archival/libarchive/bz/huffman.c
index 676b1af66..bbec11adb 100644
--- a/archival/libarchive/bz/huffman.c
+++ b/archival/libarchive/bz/huffman.c
@@ -48,7 +48,7 @@ in the file LICENSE.
48 48
49 49
50/* 90 bytes, 0.3% of overall compress speed */ 50/* 90 bytes, 0.3% of overall compress speed */
51#if CONFIG_BZIP2_FEATURE_SPEED >= 1 51#if CONFIG_BZIP2_FAST >= 1
52 52
53/* macro works better than inline (gcc 4.2.1) */ 53/* macro works better than inline (gcc 4.2.1) */
54#define DOWNHEAP1(heap, weight, Heap) \ 54#define DOWNHEAP1(heap, weight, Heap) \