3989e5adf4
These parts of the code essentially check whether stepping back by rep0 goes negative or not. LZMA SDK from lzma1604.7z has the following in the corresponding places: ... = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)] Clearly, not loop here. Technically, "while" here works: if condition is false (because pos underflowed), it iterates once, adds header.dict_size (a.k.a. dicBufSize), this makes pos positive but smaller than header.dict_size, and loop exits. Now we'll just check for negative result of subtraction, which is less code: function old new delta unpack_lzma_stream 2659 2641 -18 (I hope 2 Gbyte+ dictionaries won't be in use soon). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
||
---|---|---|
.. | ||
bz | ||
unxz | ||
common.c | ||
data_align.c | ||
data_extract_all.c | ||
data_extract_to_command.c | ||
data_extract_to_stdout.c | ||
data_skip.c | ||
decompress_bunzip2.c | ||
decompress_gunzip.c | ||
decompress_uncompress.c | ||
decompress_unlzma.c | ||
decompress_unxz.c | ||
filter_accept_all.c | ||
filter_accept_list_reassign.c | ||
filter_accept_list.c | ||
filter_accept_reject_list.c | ||
find_list_entry.c | ||
get_header_ar.c | ||
get_header_cpio.c | ||
get_header_tar_bz2.c | ||
get_header_tar_gz.c | ||
get_header_tar_lzma.c | ||
get_header_tar_xz.c | ||
get_header_tar.c | ||
header_list.c | ||
header_skip.c | ||
header_verbose_list.c | ||
init_handle.c | ||
Kbuild.src | ||
liblzo.h | ||
lzo1x_1.c | ||
lzo1x_1o.c | ||
lzo1x_9x.c | ||
lzo1x_c.c | ||
lzo1x_d.c | ||
open_transformer.c | ||
seek_by_jump.c | ||
seek_by_read.c | ||
unpack_ar_archive.c | ||
unsafe_prefix.c |