diff options
author | Denis Vlasenko | 2008-03-18 03:13:25 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-03-18 03:13:25 +0000 |
commit | c0183e6e0d0ad0b60b8891cd0a1eeabf3406805c (patch) | |
tree | 0ffc01e67f6d85005086426d375471d2b139e426 /archival | |
parent | 6aa7696e280181cd87f7569ce65696b760dca891 (diff) | |
download | busybox-c0183e6e0d0ad0b60b8891cd0a1eeabf3406805c.zip busybox-c0183e6e0d0ad0b60b8891cd0a1eeabf3406805c.tar.gz |
unlzma: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com>
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/decompress_unlzma.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c index aea0c8d..5fb7eae 100644 --- a/archival/libunarchive/decompress_unlzma.c +++ b/archival/libunarchive/decompress_unlzma.c @@ -324,6 +324,7 @@ unpack_lzma_stream(int src_fd, int dst_fd) previous_byte = (uint8_t) mi; #if ENABLE_FEATURE_LZMA_FAST + one_byte1: buffer[buffer_pos++] = previous_byte; if (buffer_pos == header.dict_size) { buffer_pos = 0; @@ -334,7 +335,7 @@ unpack_lzma_stream(int src_fd, int dst_fd) } #else len = 1; - goto one_byte; + goto one_byte2; #endif } else { int offset; @@ -367,15 +368,7 @@ unpack_lzma_stream(int src_fd, int dst_fd) while (pos >= header.dict_size) pos += header.dict_size; previous_byte = buffer[pos]; - buffer[buffer_pos++] = previous_byte; - if (buffer_pos == header.dict_size) { - buffer_pos = 0; - global_pos += header.dict_size; - if (full_write(dst_fd, buffer, header.dict_size) != header.dict_size) - goto bad; - USE_DESKTOP(total_written += header.dict_size;) - } - continue; + goto one_byte1; #else len = 1; goto string; @@ -482,7 +475,7 @@ unpack_lzma_stream(int src_fd, int dst_fd) while (pos >= header.dict_size) pos += header.dict_size; previous_byte = buffer[pos]; - SKIP_FEATURE_LZMA_FAST(one_byte:) + SKIP_FEATURE_LZMA_FAST(one_byte2:) buffer[buffer_pos++] = previous_byte; if (buffer_pos == header.dict_size) { buffer_pos = 0; |