Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6-0]: src/external/zlib/pigz Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/6926fc225bce
branches:  netbsd-6-0
changeset: 775059:6926fc225bce
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Mar 17 19:35:48 2015 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #1268):
        external/zlib/pigz/bin/pigz/Makefile: up to 1.8
        external/zlib/pigz/dist/Makefile: up to 1.1.1.2
        external/zlib/pigz/dist/README: up to 1.1.1.2
        external/zlib/pigz/dist/pigz.1: up to 1.5
        external/zlib/pigz/dist/pigz.c: up to 1.2
        external/zlib/pigz/dist/pigz.pdf: up to 1.1.1.2
        external/zlib/pigz/dist/pigz.ps: delete
        external/zlib/pigz/dist/pigz.spec: up to 1.1.1.2
        external/zlib/pigz/dist/yarn.c: up to 1.1.1.2
        external/zlib/pigz/dist/yarn.h: up to 1.1.1.2
        external/zlib/pigz/dist/zopfli/CONTRIBUTORS: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/COPYING: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/README: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/blocksplitter.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/blocksplitter.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/cache.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/cache.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/deflate.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/deflate.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/gzip_container.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/gzip_container.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/hash.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/hash.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/katajainen.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/katajainen.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/lz77.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/lz77.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/makefile: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/squeeze.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/squeeze.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/tree.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/tree.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/util.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/util.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/zlib_container.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/zlib_container.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/zopfli.h: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/zopfli_bin.c: up to 1.1.1.1
        external/zlib/pigz/dist/zopfli/zopfli_lib.c: up to 1.1.1.1
sync pigz with HEAD

diffstat:

 external/zlib/pigz/bin/pigz/Makefile            |    10 +-
 external/zlib/pigz/dist/Makefile                |    60 +-
 external/zlib/pigz/dist/README                  |     8 +-
 external/zlib/pigz/dist/pigz.1                  |    33 +-
 external/zlib/pigz/dist/pigz.c                  |  2474 +++++++++++++++-------
 external/zlib/pigz/dist/pigz.pdf                |   Bin 
 external/zlib/pigz/dist/pigz.ps                 |   379 ---
 external/zlib/pigz/dist/pigz.spec               |    59 +-
 external/zlib/pigz/dist/yarn.c                  |    18 +-
 external/zlib/pigz/dist/yarn.h                  |    10 +-
 external/zlib/pigz/dist/zopfli/CONTRIBUTORS     |     6 +
 external/zlib/pigz/dist/zopfli/COPYING          |   201 +
 external/zlib/pigz/dist/zopfli/README           |    24 +
 external/zlib/pigz/dist/zopfli/blocksplitter.c  |   344 +++
 external/zlib/pigz/dist/zopfli/blocksplitter.h  |    77 +
 external/zlib/pigz/dist/zopfli/cache.c          |   119 +
 external/zlib/pigz/dist/zopfli/cache.h          |    66 +
 external/zlib/pigz/dist/zopfli/deflate.c        |   705 ++++++
 external/zlib/pigz/dist/zopfli/deflate.h        |    77 +
 external/zlib/pigz/dist/zopfli/gzip_container.c |   117 +
 external/zlib/pigz/dist/zopfli/gzip_container.h |    42 +
 external/zlib/pigz/dist/zopfli/hash.c           |   135 +
 external/zlib/pigz/dist/zopfli/hash.h           |    70 +
 external/zlib/pigz/dist/zopfli/katajainen.c     |   251 ++
 external/zlib/pigz/dist/zopfli/katajainen.h     |    42 +
 external/zlib/pigz/dist/zopfli/lz77.c           |   468 ++++
 external/zlib/pigz/dist/zopfli/lz77.h           |   126 +
 external/zlib/pigz/dist/zopfli/makefile         |     5 +
 external/zlib/pigz/dist/zopfli/squeeze.c        |   543 +++++
 external/zlib/pigz/dist/zopfli/squeeze.h        |    60 +
 external/zlib/pigz/dist/zopfli/tree.c           |   101 +
 external/zlib/pigz/dist/zopfli/tree.h           |    51 +
 external/zlib/pigz/dist/zopfli/util.c           |   202 +
 external/zlib/pigz/dist/zopfli/util.h           |   175 +
 external/zlib/pigz/dist/zopfli/zlib_container.c |    79 +
 external/zlib/pigz/dist/zopfli/zlib_container.h |    42 +
 external/zlib/pigz/dist/zopfli/zopfli.h         |    71 +
 external/zlib/pigz/dist/zopfli/zopfli_bin.c     |   204 +
 external/zlib/pigz/dist/zopfli/zopfli_lib.c     |    34 +
 39 files changed, 6262 insertions(+), 1226 deletions(-)

diffs (truncated from 9070 to 300 lines):

diff -r 7771bbe0a5fe -r 6926fc225bce external/zlib/pigz/bin/pigz/Makefile
--- a/external/zlib/pigz/bin/pigz/Makefile      Tue Mar 17 18:38:37 2015 +0000
+++ b/external/zlib/pigz/bin/pigz/Makefile      Tue Mar 17 19:35:48 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2011/05/26 12:56:27 joerg Exp $
+#      $NetBSD: Makefile,v 1.7.12.1 2015/03/17 19:35:48 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -12,10 +12,14 @@
 SRCS=          pigz.c yarn.c
 MAN=           pigz.1
 
+# pigz 2.3.1 brings zopfli support
+SRCS+=         deflate.c blocksplitter.c tree.c lz77.c cache.c hash.c util.c \
+               squeeze.c katajainen.c
+
 .if !defined(HOSTPROG)
 DPADD=         ${LIBM} ${LIBPTHREAD}
 .endif
-LDADD=         -lz -lpthread
+LDADD=         -lm -lz -lpthread
 
 .if ${MKPIGZGZIP} != "no"
 # these ones are from mrg's gzip
@@ -43,7 +47,7 @@
 .include <bsd.prog.mk>
 
 DIST=          ${NETBSDSRCDIR}/external/zlib/pigz/dist
-.PATH: ${DIST}
+.PATH: ${DIST} ${DIST}/zopfli
 
 .if ${MKPIGZGZIP} != "no"
 GZIPDIST=      ${NETBSDSRCDIR}/usr.bin/gzip
diff -r 7771bbe0a5fe -r 6926fc225bce external/zlib/pigz/dist/Makefile
--- a/external/zlib/pigz/dist/Makefile  Tue Mar 17 18:38:37 2015 +0000
+++ b/external/zlib/pigz/dist/Makefile  Tue Mar 17 19:35:48 2015 +0000
@@ -1,29 +1,49 @@
-CFLAGS=-O3
+CC=cc
+CFLAGS=-O3 -Wall -Wextra
 
-pigz: pigz.o yarn.o
-       cc -o pigz pigz.o yarn.o -lpthread -lz
+
+pigz: pigz.o yarn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o
+       $(CC) $(LDFLAGS) -o pigz $^ -lpthread -lz -lm
        ln -f pigz unpigz
 
-pigz.o: pigz.c yarn.h
+pigz.o: pigz.c yarn.h zopfli/deflate.h zopfli/util.h
 
 yarn.o: yarn.c yarn.h
 
+zopfli/deflate.o: zopfli/deflate.c zopfli/deflate.h zopfli/blocksplitter.h zopfli/lz77.h zopfli/squeeze.h zopfli/tree.h zopfli/zopfli.h zopfli/cache.h zopfli/hash.h zopfli/util.h
+
+zopfli/blocksplitter.o: zopfli/blocksplitter.c zopfli/blocksplitter.h zopfli/deflate.h zopfli/lz77.h zopfli/squeeze.h zopfli/tree.h zopfli/util.h zopfli/zopfli.h zopfli/cache.h zopfli/hash.h
+
+zopfli/tree.o: zopfli/tree.c zopfli/tree.h zopfli/katajainen.h zopfli/util.h
+
+zopfli/lz77.o: zopfli/lz77.h zopfli/util.h zopfli/cache.h zopfli/hash.h zopfli/zopfli.h
+
+zopfli/cache.o: zopfli/cache.c zopfli/cache.h zopfli/util.h
+
+zopfli/hash.o: zopfli/hash.c zopfli/hash.h zopfli/util.h
+
+zopfli/util.o: zopfli/util.c zopfli/util.h
+
+zopfli/squeeze.o: zopfli/squeeze.c zopfli/squeeze.h zopfli/blocksplitter.h zopfli/deflate.h zopfli/tree.h zopfli/util.h zopfli/zopfli.h zopfli/lz77.h zopfli/cache.h zopfli/hash.h
+
+zopfli/katajainen.o: zopfli/katajainen.c zopfli/katajainen.h
+
 dev: pigz pigzt pigzn
 
-pigzt: pigzt.o yarnt.o
-       cc -o pigzt pigzt.o yarnt.o -lpthread -lz
+pigzt: pigzt.o yarnt.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o
+       $(CC) $(LDFLAGS) -o pigzt $^ -lpthread -lz -lm
 
 pigzt.o: pigz.c yarn.h
-       cc -Wall -O3 -DDEBUG -g -c -o pigzt.o pigz.c
+       $(CC) $(CFLAGS) -DDEBUG -g -c -o pigzt.o pigz.c
 
 yarnt.o: yarn.c yarn.h
-       cc -Wall -O3 -DDEBUG -g -c -o yarnt.o yarn.c
+       $(CC) $(CFLAGS) -DDEBUG -g -c -o yarnt.o yarn.c
 
-pigzn: pigzn.o
-       cc -o pigzn pigzn.o -lz
+pigzn: pigzn.o zopfli/deflate.o zopfli/blocksplitter.o zopfli/tree.o zopfli/lz77.o zopfli/cache.o zopfli/hash.o zopfli/util.o zopfli/squeeze.o zopfli/katajainen.o
+       $(CC) $(LDFLAGS) -o pigzn $^ -lz -lm
 
 pigzn.o: pigz.c
-       cc -Wall -O3 -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
+       $(CC) $(CFLAGS) -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
 
 test: pigz
        ./pigz -kf pigz.c ; ./pigz -t pigz.c.gz
@@ -31,12 +51,22 @@
        ./pigz -kfp 1 pigz.c ; ./pigz -t pigz.c.gz
        ./pigz -kfz pigz.c ; ./pigz -t pigz.c.zz
        ./pigz -kfK pigz.c ; ./pigz -t pigz.c.zip
-       compress -f < pigz.c | ./unpigz | cmp - pigz.c
-       rm -f pigz.c.gz pigz.c.zz pigz.c.zip
+       printf "" | ./pigz -cdf | wc -c | test `cat` -eq 0
+       printf "x" | ./pigz -cdf | wc -c | test `cat` -eq 1
+       printf "xy" | ./pigz -cdf | wc -c | test `cat` -eq 2
+       printf "xyz" | ./pigz -cdf | wc -c | test `cat` -eq 3
+       (printf "w" | gzip ; printf "x") | ./pigz -cdf | wc -c | test `cat` -eq 2
+       (printf "w" | gzip ; printf "xy") | ./pigz -cdf | wc -c | test `cat` -eq 3
+       (printf "w" | gzip ; printf "xyz") | ./pigz -cdf | wc -c | test `cat` -eq 4
+       -@if test "`whereis compress | grep /`" != ""; then \
+         echo 'compress -f < pigz.c | ./unpigz | cmp - pigz.c' ;\
+         compress -f < pigz.c | ./unpigz | cmp - pigz.c ;\
+       fi
+       @rm -f pigz.c.gz pigz.c.zz pigz.c.zip
 
 tests: dev test
        ./pigzn -kf pigz.c ; ./pigz -t pigz.c.gz
-       rm -f pigz.c.gz
+       @rm -f pigz.c.gz
 
 docs: pigz.pdf
 
@@ -44,4 +74,4 @@
        groff -mandoc -f H -T ps pigz.1 | ps2pdf - pigz.pdf
 
 clean:
-       rm -f *.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip
+       @rm -f *.o zopfli/*.o pigz unpigz pigzn pigzt pigz.c.gz pigz.c.zz pigz.c.zip
diff -r 7771bbe0a5fe -r 6926fc225bce external/zlib/pigz/dist/README
--- a/external/zlib/pigz/dist/README    Tue Mar 17 18:38:37 2015 +0000
+++ b/external/zlib/pigz/dist/README    Tue Mar 17 19:35:48 2015 +0000
@@ -1,4 +1,4 @@
-pigz 2.1.6 (17 Jan 2010) by Mark Adler
+pigz 2.3.1 (9 Oct 2013) by Mark Adler
 
 pigz, which stands for Parallel Implementation of GZip, is a fully functional
 replacement for gzip that exploits multiple processors and multiple cores to
@@ -14,8 +14,10 @@
 Type "pigz" to see the command help and all of the command options.
 
 The latest version of pigz can be found at http://zlib.net/pigz/ .  You need
-zlib version 1.2.3 or later to compile pigz.  You can find the latest version
-of zlib at http://zlib.net/ .  You can look in pigz.c for the change history.
+zlib version 1.2.3 or later to compile pigz.  zlib version 1.2.6 or later is
+recommended, which reduces the overhead between blocks.  You can find the
+latest version of zlib at http://zlib.net/ .  You can look in pigz.c for the
+change history.
 
 Questions, comments, bug reports, fixes, etc. can be emailed to Mark at his
 address in the license below.
diff -r 7771bbe0a5fe -r 6926fc225bce external/zlib/pigz/dist/pigz.1
--- a/external/zlib/pigz/dist/pigz.1    Tue Mar 17 18:38:37 2015 +0000
+++ b/external/zlib/pigz/dist/pigz.1    Tue Mar 17 19:35:48 2015 +0000
@@ -1,4 +1,5 @@
-.Dd June 19, 2010
+.\" $NetBSD: pigz.1,v 1.2.14.1 2015/03/17 19:35:48 snj Exp $
+.Dd June 15, 2014
 .Dt PIGZ 1
 .Os
 .Sh NAME
@@ -7,8 +8,11 @@
 .Nd compress or expand files
 .Sh SYNOPSIS
 .Nm
-.Op Fl 0..9cdfhiKkLlNnqRrTtz
+.Op Fl 0..9cdFfhiKkLlNnqORrTtz
+.Op Fl 11
 .Op Fl b Ar blocksize
+.Op Fl I Ar iterations
+.Op Fl M Ar maxsplits
 .Op Fl p Ar threads
 .Op Fl S Ar suffix
 .Op Ar
@@ -27,7 +31,8 @@
 value is calculated from the individual check values.
 .Pp
 The compressed data format generated is in the gzip, zlib, or single-entry
-zip format using the deflate compression method.  The compression produces
+zip format using the deflate compression method.
+The compression produces
 partial raw deflate streams which are concatenated by a single write thread
 and wrapped with the appropriate header and trailer, where the trailer
 contains the combined check value.
@@ -47,7 +52,7 @@
 .Fl b
 option.
 The number of compress threads is set by default to the number
-of online processors, which can be changed using the 
+of online processors, which can be changed using the
 .Fl p
 option.
 Specifying
@@ -96,7 +101,12 @@
 or
 .Fl Fl best
 indicates the slowest compression method (best compression).
-Level 0 is no compression.
+.Fl 0
+is no compression.
+.Fl 11
+gives a few percent better compression at a severe cost in execution time.
+The default is
+.Fl 6 .
 .It Fl b, Fl Fl blocksize Ar mmm
 Set compression block size to
 .Ar mmm
@@ -105,10 +115,14 @@
 Write all processed output to stdout (won't delete).
 .It Fl d, Fl Fl decompress, Fl Fl uncompress
 Decompress the compressed input.
+.It Fl F, Fl Fl first
+If compressing at level 11, do iterations first, before block split (default is last).
 .It Fl f, Fl Fl force
 Force overwrite, compress .gz, links, and to terminal.
 .It Fl h, Fl Fl help
 Display a help screen and quit.
+.It Fl I, Fl Fl iterations Ar n
+If compressing at level 11, number of iterations for optimization (default 15).
 .It Fl i, Fl Fl independent
 Compress blocks independently for damage recovery.
 .It Fl K, Fl Fl zip
@@ -121,14 +135,21 @@
 license and quit.
 .It Fl l, Fl Fl list
 List the contents of the compressed input.
+.It Fl M, Fl Fl maxsplits Ar n
+If compressing at level 11, maximum number of split blocks (default 15).
 .It Fl N, Fl Fl name
 Store/restore file name and mod time in/from header.
 .It Fl n, Fl Fl no-name
 Do not store or restore file name in/from header.
+.It Fl O, Fl Fl oneblock
+If compressing at level 11, do not split into smaller blocks (default is
+block splitting).
 .It Fl p, Fl Fl processes Ar n
 Allow up to n processes (default is the number of online processors)
 .It Fl q, Fl Fl quiet, Fl Fl silent
 Print no messages, even on error.
+.It Fl R, Fl Fl rsyncable
+Input-determined block locations for rsync.
 .It Fl r, Fl Fl recursive
 Process the contents of all subdirectories.
 .It Fl S, Fl Fl suffix Ar .sss
@@ -157,4 +178,4 @@
 arising from the use of this software.
 .Pp
 Copyright (C) 2007, 2008, 2009, 2010
-.An Mark Adler Aq madler%alumni.caltech.edu@localhost
+.An Mark Adler Aq Mt madler%alumni.caltech.edu@localhost
diff -r 7771bbe0a5fe -r 6926fc225bce external/zlib/pigz/dist/pigz.c
--- a/external/zlib/pigz/dist/pigz.c    Tue Mar 17 18:38:37 2015 +0000
+++ b/external/zlib/pigz/dist/pigz.c    Tue Mar 17 19:35:48 2015 +0000
@@ -1,6 +1,6 @@
 /* pigz.c -- parallel implementation of gzip
- * Copyright (C) 2007, 2008, 2009, 2010 Mark Adler
- * Version 2.1.6  17 Jan 2010  Mark Adler
+ * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Mark Adler
+ * Version 2.3.1  9 Oct 2013  Mark Adler
  */
 
 /*
@@ -47,7 +47,7 @@
                        Implement all command line options except --recursive
                        Add --keep option to prevent deleting input files
                        Add thread tracing information with -vv used
-                       Copy crc32_combine() from zlib (possible thread issue)
+                       Copy crc32_combine() from zlib (shared libraries issue)
    1.3    25 Feb 2007  Implement --recursive
                        Expand help to show all options
                        Show help if no arguments or output piping are provided
@@ -106,15 +106,69 @@
                        Decompress if executable named "gunzip" [Hoffstätte]
                        Allow ".tgz" suffix [Chernookiy]
                        Fix adler32 comparison on .zz files
+   2.1.7  17 Dec 2011  Avoid unused parameter warning in reenter()
+                       Don't assume 2's complement ints in compress_thread()
+                       Replicate gzip -cdf cat-like behavior
+                       Replicate gzip -- option to suppress option decoding
+                       Test output from make test instead of showing it
+                       Updated pigz.spec to install unpigz, pigz.1 [Obermaier]
+                       Add PIGZ environment variable [Mueller]
+                       Replicate gzip suffix search when decoding or listing
+                       Fix bug in load() to set in_left to zero on end of file
+                       Do not check suffix when input file won't be modified
+                       Decompress to stdout if name is "*cat" [Hayasaka]
+                       Write data descriptor signature to be like Info-ZIP
+                       Update and sort options list in help
+                       Use CC variable for compiler in Makefile
+                       Exit with code 2 if a warning has been issued
+                       Fix thread synchronization problem when tracing
+                       Change macro name MAX to MAX2 to avoid library conflicts
+                       Determine number of processors on HP-UX [Lloyd]
+   2.2    31 Dec 2011  Check for expansion bound busting (e.g. modified zlib)
+                       Make the "threads" list head global variable volatile
+                       Fix construction and printing of 32-bit check values
+                       Add --rsyncable functionality
+   2.2.1   1 Jan 2012  Fix bug in --rsyncable buffer management
+   2.2.2   1 Jan 2012  Fix another bug in --rsyncable buffer management



Home | Main Index | Thread Index | Old Index