update patch
This commit is contained in:
parent
a0284149fc
commit
7047be9adc
@ -1,42 +1,7 @@
|
|||||||
--- gzip-1.3.9/gzip.c.pom 2007-01-15 14:32:26.000000000 +0100
|
diff -up gzip-1.3.12/trees.c.rsync gzip-1.3.12/trees.c
|
||||||
+++ gzip-1.3.9/gzip.c 2007-01-15 14:54:08.000000000 +0100
|
--- gzip-1.3.12/trees.c.rsync 2006-11-20 09:40:33.000000000 +0100
|
||||||
@@ -238,6 +238,7 @@
|
+++ gzip-1.3.12/trees.c 2008-09-01 14:35:12.000000000 +0200
|
||||||
unsigned insize; /* valid bytes in inbuf */
|
@@ -860,9 +860,10 @@ local void send_all_trees(lcodes, dcodes
|
||||||
unsigned inptr; /* index of next byte to be processed in inbuf */
|
|
||||||
unsigned outcnt; /* bytes in output buffer */
|
|
||||||
+int rsync = 0; /* make ryncable chunks */
|
|
||||||
|
|
||||||
struct option longopts[] =
|
|
||||||
{
|
|
||||||
@@ -267,6 +268,7 @@
|
|
||||||
{"best", 0, 0, '9'}, /* compress better */
|
|
||||||
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
|
||||||
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
|
||||||
+ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */
|
|
||||||
{ 0, 0, 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -348,6 +350,7 @@
|
|
||||||
" -Z, --lzw produce output compatible with old compress",
|
|
||||||
" -b, --bits=BITS max number of bits per code (implies -Z)",
|
|
||||||
#endif
|
|
||||||
+ " --rsyncable Make rsync-friendly archive",
|
|
||||||
"",
|
|
||||||
"With no FILE, or when FILE is -, read standard input.",
|
|
||||||
"",
|
|
||||||
@@ -473,6 +476,9 @@
|
|
||||||
recursive = 1;
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
+
|
|
||||||
+ case 'R':
|
|
||||||
+ rsync = 1; break;
|
|
||||||
case 'S':
|
|
||||||
#ifdef NO_MULTIPLE_DOTS
|
|
||||||
if (*optarg == '.') optarg++;
|
|
||||||
--- gzip-1.3.9/trees.c.pom 2006-11-20 09:40:33.000000000 +0100
|
|
||||||
+++ gzip-1.3.9/trees.c 2007-01-15 14:58:42.000000000 +0100
|
|
||||||
@@ -860,9 +860,10 @@
|
|
||||||
* trees or store, and output the encoded block to the zip file. This function
|
* trees or store, and output the encoded block to the zip file. This function
|
||||||
* returns the total compressed length for the file so far.
|
* returns the total compressed length for the file so far.
|
||||||
*/
|
*/
|
||||||
@ -48,7 +13,7 @@
|
|||||||
int eof; /* true if this is the last block for a file */
|
int eof; /* true if this is the last block for a file */
|
||||||
{
|
{
|
||||||
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
|
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
|
||||||
@@ -955,6 +956,10 @@
|
@@ -955,6 +956,10 @@ off_t flush_block(buf, stored_len, eof)
|
||||||
Assert (input_len == bytes_in, "bad input size");
|
Assert (input_len == bytes_in, "bad input size");
|
||||||
bi_windup();
|
bi_windup();
|
||||||
compressed_len += 7; /* align on byte boundary */
|
compressed_len += 7; /* align on byte boundary */
|
||||||
@ -59,9 +24,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return compressed_len >> 3;
|
return compressed_len >> 3;
|
||||||
--- gzip-1.3.9/deflate.c.pom 2006-12-08 00:53:00.000000000 +0100
|
diff -up gzip-1.3.12/deflate.c.rsync gzip-1.3.12/deflate.c
|
||||||
+++ gzip-1.3.9/deflate.c 2007-01-15 15:25:40.000000000 +0100
|
--- gzip-1.3.12/deflate.c.rsync 2006-12-08 00:53:00.000000000 +0100
|
||||||
@@ -135,6 +135,14 @@
|
+++ gzip-1.3.12/deflate.c 2008-09-01 14:35:12.000000000 +0200
|
||||||
|
@@ -135,6 +135,14 @@ static char rcsid[] = "$Id: deflate.c,v
|
||||||
#endif
|
#endif
|
||||||
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
|
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
|
||||||
|
|
||||||
@ -76,7 +42,7 @@
|
|||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* Local data used by the "longest match" routines.
|
* Local data used by the "longest match" routines.
|
||||||
*/
|
*/
|
||||||
@@ -216,6 +224,8 @@
|
@@ -216,6 +224,8 @@ local int compr_level;
|
||||||
unsigned near good_match;
|
unsigned near good_match;
|
||||||
/* Use a faster search when the previous match is longer than this */
|
/* Use a faster search when the previous match is longer than this */
|
||||||
|
|
||||||
@ -85,7 +51,7 @@
|
|||||||
|
|
||||||
/* Values for max_lazy_match, good_match and max_chain_length, depending on
|
/* Values for max_lazy_match, good_match and max_chain_length, depending on
|
||||||
* the desired pack level (0..9). The values given below have been tuned to
|
* the desired pack level (0..9). The values given below have been tuned to
|
||||||
@@ -314,6 +324,10 @@
|
@@ -314,6 +324,10 @@ void lm_init (pack_level, flags)
|
||||||
#endif
|
#endif
|
||||||
/* prev will be initialized on the fly */
|
/* prev will be initialized on the fly */
|
||||||
|
|
||||||
@ -96,7 +62,7 @@
|
|||||||
/* Set the default configuration parameters:
|
/* Set the default configuration parameters:
|
||||||
*/
|
*/
|
||||||
max_lazy_match = configuration_table[pack_level].max_lazy;
|
max_lazy_match = configuration_table[pack_level].max_lazy;
|
||||||
@@ -550,6 +564,8 @@
|
@@ -550,6 +564,8 @@ local void fill_window()
|
||||||
memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
|
memcpy((char*)window, (char*)window+WSIZE, (unsigned)WSIZE);
|
||||||
match_start -= WSIZE;
|
match_start -= WSIZE;
|
||||||
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
|
strstart -= WSIZE; /* we now have strstart >= MAX_DIST: */
|
||||||
@ -105,7 +71,7 @@
|
|||||||
|
|
||||||
block_start -= (long) WSIZE;
|
block_start -= (long) WSIZE;
|
||||||
|
|
||||||
@@ -577,13 +593,46 @@
|
@@ -577,13 +593,46 @@ local void fill_window()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,7 +119,7 @@
|
|||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* Processes a new input file and return its compressed length. This
|
* Processes a new input file and return its compressed length. This
|
||||||
@@ -594,7 +643,7 @@
|
@@ -594,7 +643,7 @@ local void fill_window()
|
||||||
local off_t deflate_fast()
|
local off_t deflate_fast()
|
||||||
{
|
{
|
||||||
IPos hash_head; /* head of the hash chain */
|
IPos hash_head; /* head of the hash chain */
|
||||||
@ -162,7 +128,7 @@
|
|||||||
unsigned match_length = 0; /* length of best match */
|
unsigned match_length = 0; /* length of best match */
|
||||||
|
|
||||||
prev_length = MIN_MATCH-1;
|
prev_length = MIN_MATCH-1;
|
||||||
@@ -624,6 +673,7 @@
|
@@ -624,6 +673,7 @@ local off_t deflate_fast()
|
||||||
|
|
||||||
lookahead -= match_length;
|
lookahead -= match_length;
|
||||||
|
|
||||||
@ -170,7 +136,7 @@
|
|||||||
/* Insert new strings in the hash table only if the match length
|
/* Insert new strings in the hash table only if the match length
|
||||||
* is not too large. This saves time but degrades compression.
|
* is not too large. This saves time but degrades compression.
|
||||||
*/
|
*/
|
||||||
@@ -652,9 +702,14 @@
|
@@ -652,9 +702,14 @@ local off_t deflate_fast()
|
||||||
/* No match, output a literal byte */
|
/* No match, output a literal byte */
|
||||||
Tracevv((stderr,"%c",window[strstart]));
|
Tracevv((stderr,"%c",window[strstart]));
|
||||||
flush = ct_tally (0, window[strstart]);
|
flush = ct_tally (0, window[strstart]);
|
||||||
@ -185,7 +151,7 @@
|
|||||||
if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
if (flush) FLUSH_BLOCK(0), block_start = strstart;
|
||||||
|
|
||||||
/* Make sure that we always have enough lookahead, except
|
/* Make sure that we always have enough lookahead, except
|
||||||
@@ -728,6 +783,7 @@
|
@@ -728,6 +783,7 @@ off_t deflate()
|
||||||
*/
|
*/
|
||||||
lookahead -= prev_length-1;
|
lookahead -= prev_length-1;
|
||||||
prev_length -= 2;
|
prev_length -= 2;
|
||||||
@ -193,7 +159,7 @@
|
|||||||
do {
|
do {
|
||||||
strstart++;
|
strstart++;
|
||||||
INSERT_STRING(strstart, hash_head);
|
INSERT_STRING(strstart, hash_head);
|
||||||
@@ -740,24 +796,40 @@
|
@@ -740,24 +796,40 @@ off_t deflate()
|
||||||
match_available = 0;
|
match_available = 0;
|
||||||
match_length = MIN_MATCH-1;
|
match_length = MIN_MATCH-1;
|
||||||
strstart++;
|
strstart++;
|
||||||
@ -237,9 +203,47 @@
|
|||||||
strstart++;
|
strstart++;
|
||||||
lookahead--;
|
lookahead--;
|
||||||
}
|
}
|
||||||
--- gzip-1.3.9/gzip.h.pom 2006-12-11 19:54:39.000000000 +0100
|
diff -up gzip-1.3.12/gzip.c.rsync gzip-1.3.12/gzip.c
|
||||||
+++ gzip-1.3.9/gzip.h 2007-01-15 14:47:01.000000000 +0100
|
--- gzip-1.3.12/gzip.c.rsync 2007-03-20 06:09:51.000000000 +0100
|
||||||
@@ -155,6 +155,7 @@
|
+++ gzip-1.3.12/gzip.c 2008-09-01 14:35:12.000000000 +0200
|
||||||
|
@@ -231,6 +231,7 @@ int ofd; /* output fil
|
||||||
|
unsigned insize; /* valid bytes in inbuf */
|
||||||
|
unsigned inptr; /* index of next byte to be processed in inbuf */
|
||||||
|
unsigned outcnt; /* bytes in output buffer */
|
||||||
|
+int rsync = 0; /* make ryncable chunks */
|
||||||
|
|
||||||
|
struct option longopts[] =
|
||||||
|
{
|
||||||
|
@@ -260,6 +261,7 @@ struct option longopts[] =
|
||||||
|
{"best", 0, 0, '9'}, /* compress better */
|
||||||
|
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
||||||
|
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
||||||
|
+ {"rsyncable", 0, 0, 'R'}, /* make rsync-friendly archive */
|
||||||
|
{ 0, 0, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -341,6 +343,7 @@ local void help()
|
||||||
|
" -Z, --lzw produce output compatible with old compress",
|
||||||
|
" -b, --bits=BITS max number of bits per code (implies -Z)",
|
||||||
|
#endif
|
||||||
|
+ " --rsyncable Make rsync-friendly archive",
|
||||||
|
"",
|
||||||
|
"With no FILE, or when FILE is -, read standard input.",
|
||||||
|
"",
|
||||||
|
@@ -469,6 +472,9 @@ int main (argc, argv)
|
||||||
|
recursive = 1;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
+ case 'R':
|
||||||
|
+ rsync = 1; break;
|
||||||
|
case 'S':
|
||||||
|
#ifdef NO_MULTIPLE_DOTS
|
||||||
|
if (*optarg == '.') optarg++;
|
||||||
|
diff -up gzip-1.3.12/gzip.h.rsync gzip-1.3.12/gzip.h
|
||||||
|
--- gzip-1.3.12/gzip.h.rsync 2007-03-20 06:09:51.000000000 +0100
|
||||||
|
+++ gzip-1.3.12/gzip.h 2008-09-01 14:35:12.000000000 +0200
|
||||||
|
@@ -158,6 +158,7 @@ EXTERN(uch, window); /* Sliding
|
||||||
extern unsigned insize; /* valid bytes in inbuf */
|
extern unsigned insize; /* valid bytes in inbuf */
|
||||||
extern unsigned inptr; /* index of next byte to be processed in inbuf */
|
extern unsigned inptr; /* index of next byte to be processed in inbuf */
|
||||||
extern unsigned outcnt; /* bytes in output buffer */
|
extern unsigned outcnt; /* bytes in output buffer */
|
||||||
@ -247,7 +251,7 @@
|
|||||||
|
|
||||||
extern off_t bytes_in; /* number of input bytes */
|
extern off_t bytes_in; /* number of input bytes */
|
||||||
extern off_t bytes_out; /* number of output bytes */
|
extern off_t bytes_out; /* number of output bytes */
|
||||||
@@ -303,7 +304,7 @@
|
@@ -306,7 +307,7 @@ off_t deflate OF((void));
|
||||||
/* in trees.c */
|
/* in trees.c */
|
||||||
void ct_init OF((ush *attr, int *method));
|
void ct_init OF((ush *attr, int *method));
|
||||||
int ct_tally OF((int dist, int lc));
|
int ct_tally OF((int dist, int lc));
|
||||||
@ -256,11 +260,12 @@
|
|||||||
|
|
||||||
/* in bits.c */
|
/* in bits.c */
|
||||||
void bi_init OF((file_t zipfile));
|
void bi_init OF((file_t zipfile));
|
||||||
--- gzip-1.3.9/doc/gzip.texi.pom 2006-12-08 19:45:37.000000000 +0100
|
diff -up gzip-1.3.12/doc/gzip.texi.rsync gzip-1.3.12/doc/gzip.texi
|
||||||
+++ gzip-1.3.9/doc/gzip.texi 2007-01-15 15:30:00.000000000 +0100
|
--- gzip-1.3.12/doc/gzip.texi.rsync 2007-02-06 00:29:04.000000000 +0100
|
||||||
@@ -334,6 +334,14 @@
|
+++ gzip-1.3.12/doc/gzip.texi 2008-09-01 14:35:12.000000000 +0200
|
||||||
|
@@ -350,6 +350,14 @@ specified on the command line are direct
|
||||||
into the directory and compress all the files it finds there (or
|
into the directory and compress all the files it finds there (or
|
||||||
decompress them in the case of @code{gunzip}).
|
decompress them in the case of @command{gunzip}).
|
||||||
|
|
||||||
+@item --rsyncable
|
+@item --rsyncable
|
||||||
+While compressing, synchronize the output occasionally based on the
|
+While compressing, synchronize the output occasionally based on the
|
||||||
@ -272,4 +277,4 @@
|
|||||||
+
|
+
|
||||||
@item --suffix @var{suf}
|
@item --suffix @var{suf}
|
||||||
@itemx -S @var{suf}
|
@itemx -S @var{suf}
|
||||||
Use suffix @samp{@var{suf}} instead of @samp{.gz}. Any suffix can be
|
Use suffix @var{suf} instead of @samp{.gz}. Any suffix can be
|
||||||
|
Loading…
Reference in New Issue
Block a user