This commit is contained in:
parent
014ff1d35d
commit
60bd339a3f
@ -5,9 +5,9 @@ tried out in the default gzip for Debian Sarge, and may go into the
|
|||||||
upstream gzip at somepoint in the not-too-distant future.
|
upstream gzip at somepoint in the not-too-distant future.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
--- gzip-1.3.6/deflate.c
|
--- gzip-1.3.12/deflate.c
|
||||||
+++ gzip-1.3.6/deflate.c
|
+++ gzip-1.3.12/deflate.c
|
||||||
@@ -135,6 +135,14 @@
|
@@ -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 */
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* 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 */
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
/* 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 */
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
/* 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: */
|
||||||
@ -51,7 +51,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
block_start -= (long) WSIZE;
|
block_start -= (long) WSIZE;
|
||||||
|
|
||||||
@@ -577,13 +593,46 @@
|
@@ -577,13 +593,46 @@ local void fill_window()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
/* ===========================================================================
|
/* ===========================================================================
|
||||||
* 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 */
|
||||||
@ -108,7 +108,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
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;
|
||||||
@@ -623,6 +672,7 @@
|
@@ -624,6 +673,7 @@ local off_t deflate_fast()
|
||||||
|
|
||||||
lookahead -= match_length;
|
lookahead -= match_length;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
/* 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.
|
||||||
*/
|
*/
|
||||||
@@ -651,9 +701,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]);
|
||||||
@ -131,7 +131,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
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
|
||||||
@@ -726,6 +781,7 @@
|
@@ -728,6 +783,7 @@ off_t deflate()
|
||||||
*/
|
*/
|
||||||
lookahead -= prev_length-1;
|
lookahead -= prev_length-1;
|
||||||
prev_length -= 2;
|
prev_length -= 2;
|
||||||
@ -139,7 +139,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
do {
|
do {
|
||||||
strstart++;
|
strstart++;
|
||||||
INSERT_STRING(strstart, hash_head);
|
INSERT_STRING(strstart, hash_head);
|
||||||
@@ -738,24 +794,39 @@
|
@@ -740,24 +796,39 @@ off_t deflate()
|
||||||
match_available = 0;
|
match_available = 0;
|
||||||
match_length = MIN_MATCH-1;
|
match_length = MIN_MATCH-1;
|
||||||
strstart++;
|
strstart++;
|
||||||
@ -183,11 +183,11 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
strstart++;
|
strstart++;
|
||||||
lookahead--;
|
lookahead--;
|
||||||
}
|
}
|
||||||
--- gzip-1.3.6/doc/gzip.texi
|
--- gzip-1.3.12/doc/gzip.texi
|
||||||
+++ gzip-1.3.6/doc/gzip.texi
|
+++ gzip-1.3.12/doc/gzip.texi
|
||||||
@@ -328,6 +328,14 @@
|
@@ -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
|
||||||
@ -199,10 +199,10 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
+
|
+
|
||||||
@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
|
||||||
--- gzip-1.3.6/gzip.c
|
--- gzip-1.3.12/gzip.c
|
||||||
+++ gzip-1.3.6/gzip.c
|
+++ gzip-1.3.12/gzip.c
|
||||||
@@ -218,6 +218,7 @@
|
@@ -231,6 +231,7 @@ int ofd; /* output fil
|
||||||
unsigned insize; /* valid bytes in inbuf */
|
unsigned insize; /* valid bytes in inbuf */
|
||||||
unsigned inptr; /* index of next byte to be processed in inbuf */
|
unsigned inptr; /* index of next byte to be processed in inbuf */
|
||||||
unsigned outcnt; /* bytes in output buffer */
|
unsigned outcnt; /* bytes in output buffer */
|
||||||
@ -210,7 +210,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
struct option longopts[] =
|
struct option longopts[] =
|
||||||
{
|
{
|
||||||
@@ -247,6 +248,7 @@
|
@@ -260,6 +261,7 @@ struct option longopts[] =
|
||||||
{"best", 0, 0, '9'}, /* compress better */
|
{"best", 0, 0, '9'}, /* compress better */
|
||||||
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
{"lzw", 0, 0, 'Z'}, /* make output compatible with old compress */
|
||||||
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
{"bits", 1, 0, 'b'}, /* max number of bits per code (implies -Z) */
|
||||||
@ -218,9 +218,27 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
--- gzip-1.3.6/gzip.h
|
@@ -341,6 +343,7 @@ local void help()
|
||||||
+++ gzip-1.3.6/gzip.h
|
" -Z, --lzw produce output compatible with old compress",
|
||||||
@@ -155,6 +155,7 @@
|
" -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++;
|
||||||
|
--- gzip-1.3.12/gzip.h
|
||||||
|
+++ gzip-1.3.12/gzip.h
|
||||||
|
@@ -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 */
|
||||||
@ -228,7 +246,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
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));
|
||||||
@ -237,8 +255,8 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
/* in bits.c */
|
/* in bits.c */
|
||||||
void bi_init OF((file_t zipfile));
|
void bi_init OF((file_t zipfile));
|
||||||
--- gzip-1.3.6/trees.c
|
--- gzip-1.3.12/trees.c
|
||||||
+++ gzip-1.3.6/trees.c
|
+++ gzip-1.3.12/trees.c
|
||||||
@@ -59,12 +59,13 @@
|
@@ -59,12 +59,13 @@
|
||||||
* void ct_tally (int dist, int lc);
|
* void ct_tally (int dist, int lc);
|
||||||
* Save the match info and tally the frequency counts.
|
* Save the match info and tally the frequency counts.
|
||||||
@ -257,7 +275,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -860,9 +861,10 @@
|
@@ -860,9 +861,10 @@ local void send_all_trees(lcodes, dcodes
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
@ -269,7 +287,7 @@ upstream gzip at somepoint in the not-too-distant future.
|
|||||||
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 +957,10 @@
|
@@ -955,6 +957,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 */
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 7 13:59:52 CET 2009 - schwab@suse.de
|
||||||
|
|
||||||
|
- Fixup rsyncable patch.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 8 14:19:06 CEST 2008 - schwab@suse.de
|
Thu May 8 14:19:06 CEST 2008 - schwab@suse.de
|
||||||
|
|
||||||
|
21
gzip.spec
21
gzip.spec
@ -1,10 +1,17 @@
|
|||||||
#
|
#
|
||||||
# spec file for package gzip (Version 1.3.12)
|
# spec file for package gzip (Version 1.3.12)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
|
||||||
# package are under the same license as the package itself.
|
|
||||||
#
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -17,7 +24,7 @@ Group: Productivity/Archiving/Compression
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
PreReq: %{install_info_prereq}
|
PreReq: %{install_info_prereq}
|
||||||
Version: 1.3.12
|
Version: 1.3.12
|
||||||
Release: 68
|
Release: 97
|
||||||
Summary: GNU Zip Compression Utilities
|
Summary: GNU Zip Compression Utilities
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
Patch: zgrep.diff
|
Patch: zgrep.diff
|
||||||
@ -107,11 +114,13 @@ ln -sf zmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/zless.1
|
|||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 07 2009 schwab@suse.de
|
||||||
|
- Fixup rsyncable patch.
|
||||||
* Thu May 08 2008 schwab@suse.de
|
* Thu May 08 2008 schwab@suse.de
|
||||||
- Fix zdiff with two compressed files.
|
- Fix zdiff with two compressed files.
|
||||||
* Sun May 20 2007 schwab@suse.de
|
* Sun May 20 2007 schwab@suse.de
|
||||||
- Fix compiling with glibc 2.6.
|
- Fix compiling with glibc 2.6.
|
||||||
* Sun Apr 15 2007 schwab@suse.de
|
* Sat Apr 14 2007 schwab@suse.de
|
||||||
- Update to gzip 1.3.12.
|
- Update to gzip 1.3.12.
|
||||||
* znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
|
* znew now uses $TMPDIR (default /tmp) instead of always using /tmp.
|
||||||
* Tue Mar 27 2007 dmueller@suse.de
|
* Tue Mar 27 2007 dmueller@suse.de
|
||||||
@ -273,5 +282,5 @@ ln -sf zmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/zless.1
|
|||||||
- fixed "double" /bin/gzip & /usr/bin/gzip
|
- fixed "double" /bin/gzip & /usr/bin/gzip
|
||||||
* Thu Apr 24 1997 bs@suse.de
|
* Thu Apr 24 1997 bs@suse.de
|
||||||
- added symlink /bin/gunzip
|
- added symlink /bin/gunzip
|
||||||
* Mon Apr 14 1997 florian@suse.de
|
* Sun Apr 13 1997 florian@suse.de
|
||||||
- add bug-fixes from gnu.utils.bugs
|
- add bug-fixes from gnu.utils.bugs
|
||||||
|
Loading…
Reference in New Issue
Block a user