Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/zlib/pigz initial import of pigz 2.1.6 sources.
details: https://anonhg.NetBSD.org/src/rev/ddb9188cba32
branches: trunk
changeset: 755704:ddb9188cba32
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jun 17 05:44:06 2010 +0000
description:
initial import of pigz 2.1.6 sources.
from http://www.zlib.net/pigz/:
"""
pigz, which stands for parallel implementation of gzip, is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data. pigz was
written by Mark Adler, and uses the zlib and pthread libraries.
How is it pronounced?
I'm glad you asked. It is pronounced "pig-zee". It is not pronounced like the plural of pig.
"""
once i am done adding bz2 support to pigz, i plan to obsolete my usr.bin/gzip.
diffstat:
external/zlib/pigz/Makefile | 47 +
external/zlib/pigz/README | 48 +
external/zlib/pigz/pigz.1 | 187 ++
external/zlib/pigz/pigz.c | 3128 ++++++++++++++++++++++++++++++++++++++++++
external/zlib/pigz/pigz.pdf | Bin
external/zlib/pigz/pigz.ps | 379 +++++
external/zlib/pigz/pigz.spec | 26 +
external/zlib/pigz/yarn.c | 365 ++++
external/zlib/pigz/yarn.h | 134 +
9 files changed, 4314 insertions(+), 0 deletions(-)
diffs (truncated from 4348 to 300 lines):
diff -r f59b0c2dfd37 -r ddb9188cba32 external/zlib/pigz/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/zlib/pigz/Makefile Thu Jun 17 05:44:06 2010 +0000
@@ -0,0 +1,47 @@
+CFLAGS=-O3
+
+pigz: pigz.o yarn.o
+ cc -o pigz pigz.o yarn.o -lpthread -lz
+ ln -f pigz unpigz
+
+pigz.o: pigz.c yarn.h
+
+yarn.o: yarn.c yarn.h
+
+dev: pigz pigzt pigzn
+
+pigzt: pigzt.o yarnt.o
+ cc -o pigzt pigzt.o yarnt.o -lpthread -lz
+
+pigzt.o: pigz.c yarn.h
+ cc -Wall -O3 -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
+
+pigzn: pigzn.o
+ cc -o pigzn pigzn.o -lz
+
+pigzn.o: pigz.c
+ cc -Wall -O3 -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
+
+test: pigz
+ ./pigz -kf pigz.c ; ./pigz -t pigz.c.gz
+ ./pigz -kfb 32 pigz.c ; ./pigz -t pigz.c.gz
+ ./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
+
+tests: dev test
+ ./pigzn -kf pigz.c ; ./pigz -t pigz.c.gz
+ rm -f pigz.c.gz
+
+docs: pigz.pdf
+
+pigz.pdf: pigz.1
+ 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
diff -r f59b0c2dfd37 -r ddb9188cba32 external/zlib/pigz/README
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/zlib/pigz/README Thu Jun 17 05:44:06 2010 +0000
@@ -0,0 +1,48 @@
+pigz 2.1.6 (17 Jan 2010) 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
+the hilt when compressing data.
+
+pigz was written by Mark Adler, and uses the zlib and pthread libraries.
+
+This version of pigz is written to be portable across Unix-style operating
+systems that provide the zlib and pthread libraries.
+
+Type "make" in this directory to build the "pigz" executable. You can then
+install the executable wherever you like in your path (e.g. /usr/local/bin/).
+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.
+
+Questions, comments, bug reports, fixes, etc. can be emailed to Mark at his
+address in the license below.
+
+The license from pigz.c is copied here:
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the author be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Mark Adler
+ madler%alumni.caltech.edu@localhost
+
+ Mark accepts donations for providing this software. Donations are not
+ required or expected. Any amount that you feel is appropriate would be
+ appreciated. You can use this link:
+
+ https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=536055
diff -r f59b0c2dfd37 -r ddb9188cba32 external/zlib/pigz/pigz.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/zlib/pigz/pigz.1 Thu Jun 17 05:44:06 2010 +0000
@@ -0,0 +1,187 @@
+.TH PIGZ 1 local
+.SH NAME
+pigz, unpigz \- compress or expand files
+.SH SYNOPSIS
+.ll +8
+.B pigz
+.RB [ " \-cdfhikKlLnNqrRtTz0..9 " ]
+[
+.B -b
+.I blocksize
+]
+[
+.B -p
+.I threads
+]
+[
+.B -S
+.I suffix
+]
+[
+.I "name \&..."
+]
+.ll -8
+.br
+.B unpigz
+.RB [ " \-cfhikKlLnNqrRtTz " ]
+[
+.B -b
+.I blocksize
+]
+[
+.B -p
+.I threads
+]
+[
+.B -S
+.I suffix
+]
+[
+.I "name \&..."
+]
+.SH DESCRIPTION
+.I Pigz
+compresses using threads to make use of multiple processors and cores.
+The input is broken up into 128 KB chunks with each compressed in parallel.
+The individual check value for each chunk is also calculated in parallel.
+The compressed data is written in order to the output, and a combined check
+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
+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.
+.PP
+Each partial raw deflate stream is terminated by an empty stored block
+(using the Z_SYNC_FLUSH option of zlib), in order to end that partial bit
+stream at a byte boundary. That allows the partial streams to be
+concatenated simply as sequences of bytes. This adds a very small four to
+five byte overhead to the output for each input chunk.
+.PP
+The default input block size is 128K, but can be changed with the
+.B -b
+option. The number of compress threads is set by default to the number
+of online processors,
+which can be changed using the
+.B -p
+option. Specifying
+.B -p 1
+avoids the use of threads entirely.
+.PP
+The input blocks, while compressed independently, have the last 32K of the
+previous block loaded as a preset dictionary to preserve the compression
+effectiveness of deflating in a single thread. This can be turned off using
+the
+.B -i
+or
+.B --independent
+option, so that the blocks can be decompressed
+independently for partial error recovery or for random access.
+.PP
+Decompression can't be parallelized, at least not without specially prepared
+deflate streams for that purpose. As a result,
+.I pigz
+uses a single thread
+(the main thread) for decompression, but will create three other threads for
+reading, writing, and check calculation, which can speed up decompression
+under some circumstances. Parallel decompression can be turned off by
+specifying one process
+(
+.B -dp 1
+or
+.B -tp 1
+).
+.PP
+Compressed files can be restored to their original form using
+.I pigz -d
+or
+.I unpigz.
+
+.SH OPTIONS
+.TP
+.B -# --fast --best
+Regulate the speed of compression using the specified digit
+.IR # ,
+where
+.B \-1
+or
+.B \-\-fast
+indicates the fastest compression method (less compression)
+and
+.B \-9
+or
+.B \-\-best
+indicates the slowest compression method (best compression).
+Level 0 is no compression.
+.TP
+.B -b --blocksize mmm
+Set compression block size to mmmK (default 128KiB).
+.TP
+.B -c --stdout --to-stdout
+Write all processed output to stdout (won't delete).
+.TP
+.B -d --decompress --uncompress
+Decompress the compressed input.
+.TP
+.B -f --force
+Force overwrite, compress .gz, links, and to terminal.
+.TP
+.B -h --help
+Display a help screen and quit.
+.TP
+.B -i --independent
+Compress blocks independently for damage recovery.
+.TP
+.B -k --keep
+Do not delete original file after processing.
+.TP
+.B -K --zip
+Compress to PKWare zip (.zip) single entry format.
+.TP
+.B -l --list
+List the contents of the compressed input.
+.TP
+.B -L --license
+Display the
+.I pigz
+license and quit.
+.TP
+.B -n --no-name
+Do not store or restore file name in/from header.
+.TP
+.B -N --name
+Store/restore file name and mod time in/from header.
+.TP
+.B -p --processes n
+Allow up to n processes (default is the number of online processors)
+.TP
+.B -q --quiet --silent
+Print no messages, even on error.
+.TP
+.B -r --recursive
+Process the contents of all subdirectories.
+.TP
+.B -S --suffix .sss
+Use suffix .sss instead of .gz (for compression).
+.TP
+.B -t --test
+Test the integrity of the compressed input.
+.TP
+.B -T --no-time
+Do not store or restore mod time in/from header.
+.TP
+.B -v --verbose
+Provide more verbose output.
+.TP
+.B -V --version
+Show the version of pigz.
+.TP
+.B -z --zlib
+Compress to zlib (.zz) instead of gzip format.
+.SH "COPYRIGHT NOTICE"
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the author be held liable for any damages
+arising from the use of this software.
+.PP
+Copyright (C) 2007, 2008, 2009, 2010 Mark Adler <madler%alumni.caltech.edu@localhost>
diff -r f59b0c2dfd37 -r ddb9188cba32 external/zlib/pigz/pigz.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/zlib/pigz/pigz.c Thu Jun 17 05:44:06 2010 +0000
@@ -0,0 +1,3128 @@
+/* pigz.c -- parallel implementation of gzip
+ * Copyright (C) 2007, 2008, 2009, 2010 Mark Adler
Home |
Main Index |
Thread Index |
Old Index