summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko2008-03-02 18:56:23 +0000
committerDenis Vlasenko2008-03-02 18:56:23 +0000
commit444639cc2134d483bf0845416e9b6ce8935af795 (patch)
tree1f35c5c6c57a565b06de6be485bffa4dee7df084 /archival
parentc3fff877e1c7c3f2aff2833d5f5e5b7adc95ecd6 (diff)
downloadbusybox-444639cc2134d483bf0845416e9b6ce8935af795.zip
busybox-444639cc2134d483bf0845416e9b6ce8935af795.tar.gz
unlzma: save a few more bytes, and maybe even a bit faster now
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/decompress_unlzma.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 5bf4de2..aea0c8d 100644
--- a/archival/libunarchive/decompress_unlzma.c
+++ b/archival/libunarchive/decompress_unlzma.c
@@ -306,13 +306,9 @@ unpack_lzma_stream(int src_fd, int dst_fd)
match_byte <<= 1;
bit = match_byte & 0x100;
prob_lit = prob + 0x100 + bit + mi;
- if (rc_get_bit(rc, prob_lit, &mi)) {
- if (!bit)
- break;
- } else {
- if (bit)
- break;
- }
+ bit ^= (rc_get_bit(rc, prob_lit, &mi) << 8); /* 0x100 or 0 */
+ if (bit)
+ break;
} while (mi < 0x100);
}
while (mi < 0x100) {