summaryrefslogtreecommitdiff
path: root/archival/libarchive/bz/bzlib_private.h
diff options
context:
space:
mode:
authorDenys Vlasenko2021-08-29 15:32:42 +0200
committerDenys Vlasenko2021-08-29 15:32:42 +0200
commit6d3da732a5d07b4c2f05f4f96df57b7618d0448f (patch)
tree538c3f564a719a39de4301235457f47137658674 /archival/libarchive/bz/bzlib_private.h
parent49a2e484b5bd3f6343e55bfed823d3ca6bd5d45a (diff)
downloadbusybox-6d3da732a5d07b4c2f05f4f96df57b7618d0448f.zip
busybox-6d3da732a5d07b4c2f05f4f96df57b7618d0448f.tar.gz
bzip: make ftab[] and crc32table[] member arrays of EState, do not allocate
function old new delta mainSort 941 986 +45 fallbackSort 1471 1469 -2 add_pair_to_block 194 188 -6 compressStream 543 515 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 45/-36) Total: 9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive/bz/bzlib_private.h')
-rw-r--r--archival/libarchive/bz/bzlib_private.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/archival/libarchive/bz/bzlib_private.h b/archival/libarchive/bz/bzlib_private.h
index ea0f29b..650444a 100644
--- a/archival/libarchive/bz/bzlib_private.h
+++ b/archival/libarchive/bz/bzlib_private.h
@@ -134,7 +134,7 @@ typedef struct EState {
/* for doing the block sorting */
uint32_t *arr1;
uint32_t *arr2;
- uint32_t *ftab;
+ //uint32_t *ftab; //moved into this struct, see below
uint16_t *quadrant;
int32_t budget;
@@ -160,9 +160,6 @@ typedef struct EState {
uint32_t bsBuff;
int32_t bsLive;
- /* guess what */
- uint32_t *crc32table;
-
/* block and combined CRCs */
uint32_t blockCRC;
uint32_t combinedCRC;
@@ -185,6 +182,12 @@ typedef struct EState {
uint8_t len[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
+ /* guess what */
+ uint32_t crc32table[256];
+
+ /* for doing the block sorting */
+ uint32_t ftab[65537];
+
/* stack-saving measures: these can be local, but they are too big */
int32_t sendMTFValues__code [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
int32_t sendMTFValues__rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];