gzip: new GZIP_BIG_MEM option
[oweals/busybox.git] / archival / gzip.c
index 7686e1adbd457944c70c842fdc769a1738feea70..0e0b681424e595837d552df974f148c85760e392 100644 (file)
@@ -43,7 +43,6 @@ aa:      85.1% -- replaced with aa.gz
 //usage:       "[-cfd] [FILE]..."
 //usage:#define gzip_full_usage "\n\n"
 //usage:       "Compress FILEs (or stdin)\n"
-//usage:     "\nOptions:"
 //usage:     "\n       -d      Decompress"
 //usage:     "\n       -c      Write to stdout"
 //usage:     "\n       -f      Force"
@@ -82,7 +81,11 @@ aa:      85.1% -- replaced with aa.gz
 
 /* ===========================================================================
  */
-#define SMALL_MEM
+#if ENABLE_GZIP_BIG_MEM
+# define BIG_MEM
+#else
+# define SMALL_MEM
+#endif
 
 #ifndef INBUFSIZ
 #  ifdef SMALL_MEM
@@ -1674,7 +1677,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
 
 /* ===========================================================================
  * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
+ * IN  assertion: all calls to UPDATE_HASH are made with consecutive
  *    input characters, so that a running hash key can be computed from the
  *    previous key instead of complete recalculation each time.
  */
@@ -1705,7 +1708,7 @@ static ulg flush_block(char *buf, ulg stored_len, int eof)
 /* Insert string s in the dictionary and set match_head to the previous head
  * of the hash chain (the most recent string with same hash key). Return
  * the previous length of the hash chain.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
+ * IN  assertion: all calls to INSERT_STRING are made with consecutive
  *    input characters and the first MIN_MATCH bytes of s are valid
  *    (except for the last MIN_MATCH-1 bytes of the input file). */
 #define INSERT_STRING(s, match_head) \