diff options
author | Denys Vlasenko | 2018-02-03 20:50:20 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-02-03 20:51:12 +0100 |
commit | 86be6d5ba9df8b8237a8c3edc2a844aaa63bd559 (patch) | |
tree | 8ddd248663839ac1837963c0e4f5f0697cd789c5 /archival/libarchive/bz/bzlib_private.h | |
parent | c9ae8d770bf8a21fec962f67b759569b263c68fc (diff) | |
download | busybox-86be6d5ba9df8b8237a8c3edc2a844aaa63bd559.zip busybox-86be6d5ba9df8b8237a8c3edc2a844aaa63bd559.tar.gz |
bzip2: move ->origPtr out of struct EState, make a few members smaller
function old new delta
BZ2_compressBlock 223 228 +5
BZ2_blockSort 85 88 +3
generateMTFValues 356 357 +1
handle_compress 355 349 -6
compressStream 538 531 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 9/-13) Total: -4 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.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/archival/libarchive/bz/bzlib_private.h b/archival/libarchive/bz/bzlib_private.h index fc05d0e..8b8bbe3 100644 --- a/archival/libarchive/bz/bzlib_private.h +++ b/archival/libarchive/bz/bzlib_private.h @@ -120,9 +120,11 @@ typedef struct EState { /* mode this stream is in, and whether inputting */ /* or outputting data */ - int32_t mode; -//both smallint? - int32_t state; + uint8_t mode; + uint8_t state; + + /* misc administratium */ + uint8_t blockSize100k; /* remembers avail_in when flush/finish requested */ /* bbox: not needed, strm->avail_in always has the same value */ @@ -130,12 +132,11 @@ typedef struct EState { /* uint32_t avail_in_expect; */ /* for doing the block sorting */ - int32_t origPtr; uint32_t *arr1; uint32_t *arr2; uint32_t *ftab; - uint16_t* quadrant; + uint16_t *quadrant; int32_t budget; /* aliases for arr1 and arr2 */ @@ -144,10 +145,6 @@ typedef struct EState { uint16_t *mtfv; uint8_t *zbits; - /* guess what */ - uint32_t *crc32table; -//move down - /* run-length-encoding of the input */ uint32_t state_in_ch; int32_t state_in_len; @@ -156,21 +153,22 @@ typedef struct EState { int32_t nblock; int32_t nblockMAX; //int32_t numZ; // index into s->zbits[], replaced by pointer: - uint8_t *posZ; - uint8_t *state_out_pos; + uint8_t *posZ; + uint8_t *state_out_pos; /* the buffer for bit stream creation */ uint32_t bsBuff; int32_t bsLive; + /* guess what */ + uint32_t *crc32table; + /* block and combined CRCs */ uint32_t blockCRC; uint32_t combinedCRC; /* misc administratium */ int32_t blockNo; - int32_t blockSize100k; -//smallint? /* stuff for coding the MTF values */ int32_t nMTF; @@ -206,7 +204,7 @@ typedef struct EState { /*-- compression. --*/ -static void +static int32_t BZ2_blockSort(EState*); static void |