mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 15:54:56 +00:00
unlzma: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com>
This commit is contained in:
parent
6aa7696e28
commit
c0183e6e0d
@ -324,6 +324,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
|
|||||||
|
|
||||||
previous_byte = (uint8_t) mi;
|
previous_byte = (uint8_t) mi;
|
||||||
#if ENABLE_FEATURE_LZMA_FAST
|
#if ENABLE_FEATURE_LZMA_FAST
|
||||||
|
one_byte1:
|
||||||
buffer[buffer_pos++] = previous_byte;
|
buffer[buffer_pos++] = previous_byte;
|
||||||
if (buffer_pos == header.dict_size) {
|
if (buffer_pos == header.dict_size) {
|
||||||
buffer_pos = 0;
|
buffer_pos = 0;
|
||||||
@ -334,7 +335,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
len = 1;
|
len = 1;
|
||||||
goto one_byte;
|
goto one_byte2;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
int offset;
|
int offset;
|
||||||
@ -367,15 +368,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
|
|||||||
while (pos >= header.dict_size)
|
while (pos >= header.dict_size)
|
||||||
pos += header.dict_size;
|
pos += header.dict_size;
|
||||||
previous_byte = buffer[pos];
|
previous_byte = buffer[pos];
|
||||||
buffer[buffer_pos++] = previous_byte;
|
goto one_byte1;
|
||||||
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;
|
|
||||||
#else
|
#else
|
||||||
len = 1;
|
len = 1;
|
||||||
goto string;
|
goto string;
|
||||||
@ -482,7 +475,7 @@ unpack_lzma_stream(int src_fd, int dst_fd)
|
|||||||
while (pos >= header.dict_size)
|
while (pos >= header.dict_size)
|
||||||
pos += header.dict_size;
|
pos += header.dict_size;
|
||||||
previous_byte = buffer[pos];
|
previous_byte = buffer[pos];
|
||||||
SKIP_FEATURE_LZMA_FAST(one_byte:)
|
SKIP_FEATURE_LZMA_FAST(one_byte2:)
|
||||||
buffer[buffer_pos++] = previous_byte;
|
buffer[buffer_pos++] = previous_byte;
|
||||||
if (buffer_pos == header.dict_size) {
|
if (buffer_pos == header.dict_size) {
|
||||||
buffer_pos = 0;
|
buffer_pos = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user