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/compress.c | |
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/compress.c')
-rw-r--r-- | archival/libarchive/bz/compress.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/libarchive/bz/compress.c b/archival/libarchive/bz/compress.c index f139324..f650767 100644 --- a/archival/libarchive/bz/compress.c +++ b/archival/libarchive/bz/compress.c @@ -665,6 +665,8 @@ void sendMTFValues(EState* s) static void BZ2_compressBlock(EState* s, int is_last_block) { + int32_t origPtr = origPtr; + if (s->nblock > 0) { BZ_FINALISE_CRC(s->blockCRC); s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31); @@ -672,7 +674,7 @@ void BZ2_compressBlock(EState* s, int is_last_block) if (s->blockNo > 1) s->posZ = s->zbits; // was: s->numZ = 0; - BZ2_blockSort(s); + origPtr = BZ2_blockSort(s); } s->zbits = &((uint8_t*)s->arr2)[s->nblock]; @@ -713,7 +715,7 @@ void BZ2_compressBlock(EState* s, int is_last_block) */ bsW1_0(s); - bsW(s, 24, s->origPtr); + bsW(s, 24, origPtr); generateMTFValues(s); sendMTFValues(s); } |