620 |
/* Skip to next match if the match length cannot increase |
/* Skip to next match if the match length cannot increase |
621 |
* or if the match length is less than 2: |
* or if the match length is less than 2: |
622 |
*/ |
*/ |
623 |
if (match[best_len] != scan_end || |
if (match[best_len] != scan_end |
624 |
match[best_len - 1] != scan_end1 || |
|| match[best_len - 1] != scan_end1 |
625 |
*match != *scan || *++match != scan[1]) |
|| *match != *scan || *++match != scan[1] |
626 |
|
) { |
627 |
continue; |
continue; |
628 |
|
} |
629 |
|
|
630 |
/* The check at best_len-1 can be removed because it will be made |
/* The check at best_len-1 can be removed because it will be made |
631 |
* again later. (This heuristic is not always a win.) |
* again later. (This heuristic is not always a win.) |
676 |
if (verbose > 1) { |
if (verbose > 1) { |
677 |
bb_error_msg("\\[%d,%d]", start - match, length); |
bb_error_msg("\\[%d,%d]", start - match, length); |
678 |
do { |
do { |
679 |
fputc(G1.window[start++], stderr); |
bb_putchar_stderr(G1.window[start++]); |
680 |
} while (--length != 0); |
} while (--length != 0); |
681 |
} |
} |
682 |
} |
} |
964 |
#else |
#else |
965 |
# define SEND_CODE(c, tree) \ |
# define SEND_CODE(c, tree) \ |
966 |
{ \ |
{ \ |
967 |
if (verbose > 1) bb_error_msg("\ncd %3d ",(c)); \ |
if (verbose > 1) bb_error_msg("\ncd %3d ", (c)); \ |
968 |
send_bits(tree[c].Code, tree[c].Len); \ |
send_bits(tree[c].Code, tree[c].Len); \ |
969 |
} |
} |
970 |
#endif |
#endif |
1998 |
|
|
1999 |
/* ======================================================================== */ |
/* ======================================================================== */ |
2000 |
static |
static |
2001 |
char* make_new_name_gzip(char *filename) |
IF_DESKTOP(long long) int FAST_FUNC pack_gzip(unpack_info_t *info UNUSED_PARAM) |
|
{ |
|
|
return xasprintf("%s.gz", filename); |
|
|
} |
|
|
|
|
|
static |
|
|
IF_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM) |
|
2002 |
{ |
{ |
2003 |
struct stat s; |
struct stat s; |
2004 |
|
|
2057 |
#endif |
#endif |
2058 |
|
|
2059 |
/* |
/* |
2060 |
* Linux kernel build uses gzip -d -n. We accept and ignore it. |
* Linux kernel build uses gzip -d -n. We accept and ignore -n. |
2061 |
* Man page says: |
* Man page says: |
2062 |
* -n --no-name |
* -n --no-name |
2063 |
* gzip: do not save the original file name and time stamp. |
* gzip: do not save the original file name and time stamp. |
2107 |
/* Initialise the CRC32 table */ |
/* Initialise the CRC32 table */ |
2108 |
G1.crc_32_tab = crc32_filltable(NULL, 0); |
G1.crc_32_tab = crc32_filltable(NULL, 0); |
2109 |
|
|
2110 |
return bbunpack(argv, make_new_name_gzip, pack_gzip); |
return bbunpack(argv, pack_gzip, append_ext, "gz"); |
2111 |
} |
} |