diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/gzip.c | 12 | ||||
-rw-r--r-- | archival/libunarchive/decompress_unzip.c | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 783a453a7..fa6e85b66 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -732,25 +732,26 @@ static unsigned match_start; /* start of matching string */ | |||
732 | static int eofile; /* flag set at end of input file */ | 732 | static int eofile; /* flag set at end of input file */ |
733 | static unsigned lookahead; /* number of valid bytes ahead in window */ | 733 | static unsigned lookahead; /* number of valid bytes ahead in window */ |
734 | 734 | ||
735 | static const unsigned max_chain_length = 4096; | 735 | enum { |
736 | max_chain_length = 4096, | ||
736 | 737 | ||
737 | /* To speed up deflation, hash chains are never searched beyond this length. | 738 | /* To speed up deflation, hash chains are never searched beyond this length. |
738 | * A higher limit improves compression ratio but degrades the speed. | 739 | * A higher limit improves compression ratio but degrades the speed. |
739 | */ | 740 | */ |
740 | 741 | ||
741 | static const unsigned int max_lazy_match = 258; | 742 | max_lazy_match = 258, |
742 | 743 | ||
743 | /* Attempt to find a better match only when the current match is strictly | 744 | /* Attempt to find a better match only when the current match is strictly |
744 | * smaller than this value. This mechanism is used only for compression | 745 | * smaller than this value. This mechanism is used only for compression |
745 | * levels >= 4. | 746 | * levels >= 4. |
746 | */ | 747 | */ |
747 | #define max_insert_length max_lazy_match | 748 | max_insert_length = max_lazy_match, |
748 | /* Insert new strings in the hash table only if the match length | 749 | /* Insert new strings in the hash table only if the match length |
749 | * is not greater than this length. This saves time but degrades compression. | 750 | * is not greater than this length. This saves time but degrades compression. |
750 | * max_insert_length is used only for compression levels <= 3. | 751 | * max_insert_length is used only for compression levels <= 3. |
751 | */ | 752 | */ |
752 | 753 | ||
753 | static const unsigned good_match = 32; | 754 | good_match = 32, |
754 | 755 | ||
755 | /* Use a faster search when the previous match is longer than this */ | 756 | /* Use a faster search when the previous match is longer than this */ |
756 | 757 | ||
@@ -761,12 +762,13 @@ static const unsigned good_match = 32; | |||
761 | * found for specific files. | 762 | * found for specific files. |
762 | */ | 763 | */ |
763 | 764 | ||
764 | static const int nice_match = 258; /* Stop searching when current match exceeds this */ | 765 | nice_match = 258 /* Stop searching when current match exceeds this */ |
765 | 766 | ||
766 | /* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 | 767 | /* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 |
767 | * For deflate_fast() (levels <= 3) good is ignored and lazy has a different | 768 | * For deflate_fast() (levels <= 3) good is ignored and lazy has a different |
768 | * meaning. | 769 | * meaning. |
769 | */ | 770 | */ |
771 | }; | ||
770 | 772 | ||
771 | #define EQUAL 0 | 773 | #define EQUAL 0 |
772 | /* result of memcmp for equal strings */ | 774 | /* result of memcmp for equal strings */ |
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 7776dee69..7c43bed12 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c | |||
@@ -92,7 +92,7 @@ static unsigned int gunzip_outbuf_count; /* bytes in output buffer */ | |||
92 | 92 | ||
93 | /* gunzip_window size--must be a power of two, and | 93 | /* gunzip_window size--must be a power of two, and |
94 | * at least 32K for zip's deflate method */ | 94 | * at least 32K for zip's deflate method */ |
95 | static const unsigned int gunzip_wsize = 0x8000; | 95 | enum { gunzip_wsize = 0x8000 }; |
96 | static unsigned char *gunzip_window; | 96 | static unsigned char *gunzip_window; |
97 | 97 | ||
98 | static unsigned int *gunzip_crc_table; | 98 | static unsigned int *gunzip_crc_table; |