--- zpaq-1.10.orig/debian/upstream.changelog
+++ zpaq-1.10/debian/upstream.changelog
@@ -0,0 +1,152 @@
+History
+-------
+
+Versions prior to 1.00 are not compatible with the ZPAQ
+standard and are obsolete. All versions 1.00 and higher are forward
+and backward compatible.
+
+v0.01 - Feb. 15, 2009. Original release. Conforms to v0.29 of spec.
+ except does not support postprocessing.
+
+v0.02 - Feb. 18, 2009. Adds R=X, X=R, and LJ
+ instructions and R[256] register. Removes .= instruction.
+ Spaces are required before ZPAQL operands. Adds end of segment
+ signal to decoder. Adds "x" transform (E8E9). PASS transform
+ is changed to "0". Adds a header byte to describe HCOMP
+ language. Not compatible with v0.01. Conforms to v0.32 of spec.
+ Current max.cfg does poorly with maximumcompression.com.
+ Expect more changes.
+
+v0.03 - Feb. 19, 2009. Fixed MIX, MIX2, and IMIX spec. to reduce overflow,
+ which resulted in poor compression of large files. Modified
+ stretch function for better compression.
+
+ Block 1: requires 314.476 MB memory (with POST X to turn on E8E9)
+ maxcomp\a10.jpg 842468 -> 829159
+ maxcomp\acrord32.exe 3870784 -> 1154882
+ maxcomp\english.dic 4067439 -> 476099
+ maxcomp\FlashMX.pdf 4526946 -> 3649140
+ maxcomp\fp.log 20617071 -> 432826
+ maxcomp\mso97.dll 3782416 -> 1545417
+ maxcomp\ohs.doc 4168192 -> 757538
+ maxcomp\rafale.bmp 4149414 -> 763314
+ maxcomp\vcfiu.hlp 4121418 -> 499321
+ maxcomp\world95.txt 2988578 -> 441130
+ 53,134,726 -> 10,548,826
+
+v0.04 - Feb. 21, 2009. Fixed train() spec. to fix poor compression with
+ SSE and possibly other components. Modifed squash() for better
+ compression. New max.cfg.
+
+v0.05 - Feb. 26, 2009. Changed representation of squashed probabilities
+ to 15 bits (0..32767) and stretched to 6 bit scale in (-2048..2047),
+ and mixer weights to 20 bit signed numbers. Mixers are now guaranteed
+ not to overflow. The higher resolution improves compression on highly
+ redundant files. MIX2 now has weights constrained to add to 1 which
+ also improves compression.
+
+v0.06 - Feb. 27, 2009. Optionally appends a SHA1 hash of the input file
+ for each segment, which is checked by the decompressor. Added
+ "b" command to append without a checksum. Replaced IMIX2 with
+ ISSE. Compression prints memory usage by component.
+
+v0.07 - Feb. 28, 2009. Modified ISSE to use decreasing learning rate
+ on the fixed size inversely proportional to a count. ISSE drops the
+ c and rate parameters. SSE drops the mask parameter. Bit history
+ next-state tables are updated by removing some of the n0=0 or n1=0
+ states and adding other states.
+
+v0.08 - Mar. 8, 2009. Added LZP preprocessor. Improved memory utilization
+ reporting. Minor speed improvements. Added mid.cfg. Changed
+ MATCH so that the buffer and hash table sizes are specified
+ separately. Clarified role of comment field. Removed zpaqd.exe.
+
+v0.09 - Mar. 9, 2009. Removed counters from ISSE and ICM and replaced
+ bit history map with initial estimates based on n1/(n0+n1) to
+ improve speed. Fixed a bug where x clobbers files when it says
+ it isn't.
+
+v1.00 - Mar. 12, 2009. First level 1 candidate. Simplified the
+ bit history tables and replaced with code to generate them
+ in both the documentation and code. First release of the
+ reference standard unzpaq1 v1.00. Improved compression on
+ some files.
+
+v1.01 - Apr. 27, 2009. Updated unzpaq to fix VS2005 compiler issues.
+
+v1.02 - June 14, 2009. Updated zpaq and unzpaq to close files
+ immediately after extraction instead of when program exits.
+ Fixed g++ 4.4 compiler warnings.
+
+v1.03 - Sept. 8, 2009. unzpaq and zpaq: added support for appending
+ unnamed segments to the previous file. In unzpaq 1.02 and earlier
+ you would need to extract each segment to a different file
+ and concatenate them manually. Also, unzpaq will refuse
+ to extract filenames stored with an absolute path, drive letter,
+ or that have upward links "../" or "..\" or that have
+ control characters (ASCII 0-31) in the file name unless
+ a filename is given on the command line (in which case
+ any name is allowed). Quits on the first error rather
+ than skipping files. zpaq only: made mid.cfg the default
+ configuration. Also added the k command
+ to create segmented files. When the offset is not 0 the
+ segment is stored with no name to signal the decompressor
+ to append to the previous file (which may be in a different
+ ZPAQ block). Added the r command to store full paths.
+ 1.02 and earlier always did this. By default, 1.03 stores
+ only the file name. Updated the s command to output the
+ full header as a C array.
+
+ Sept. 14, 2009. Added zpaqsfx 1.03.
+
+v1.04 - Sept. 18, 2009. zpaq will extract from self extracting archives.
+ Added progress meter. zpaqsfx.exe is slightly smaller. Fixed
+ zpaqsfx.cpp compiler issue (replaced "and" with "&&" in main()).
+
+v1.05 - Sept. 28, 2009. Removed built in x (E8E9) and p (LZP)
+ preprocessors and made these external programs (included).
+ Config files now specify an external preprocessor command
+ line and ZPAQL code to invert the transform. The inversion
+ is verified before compression. Added structured programming
+ (if/ifnot-else-endif, do-while/until/forever) to ZPAQL.
+ Reorganized the less commonly used commands. New commands
+ to extract from single blocks, extract with paths (default
+ is now to current directory), extract unnamed blocks as
+ separate files, compress without filenames or with full paths,
+ or without comments, debug both the HCOMP and new PCOMP sections
+ of config files, and display trace in either decimal or
+ hexadecimal. Fixed detection of corrupted input in decoder.
+ unzpaq.exe not included in distribution because zpaq.exe
+ has all the same functions.
+
+v1.06 - Sept. 29, 2009. Updated specification zpaq1.pdf to include
+ a recommendation of adding a 13 byte locater tag to mark the
+ start of a ZPAQ archive embedded in other data. Updated
+ zpaq.cpp, unzpaq.cpp, and zpaqsfx.cpp to find this tag.
+ Also added "ta" to append this tag. Some minor bug fixes
+ and porting issues fixed. Changed unzpaq to extract to current
+ directory by default.
+
+v1.07 - Oct. 2, 2009. zpaq config files now accept arguments. Fixed
+ a bug in min.cfg. Cleaned up "tr" command display. min.cfg,
+ mid.cfg, max.cfg accept an argument to change memory.
+ min.cfg takes a second argument to change LZP minimum match.
+ pcomp external preprocessor command must end with ;
+
+v1.08 - Oct. 14, 2009. Added optimization, which makes zpaq about
+ twice as fast if an external C++ compiler is available.
+ The "o" option compiles the model and creates a temporary
+ program optimized for the current input, and runs it.
+ Also changed meaning of "nx" to mean decompress all output
+ to one file. Fixed ZPAQL shift instructions to be consistent
+ with spec on non x86 machines.
+
+v1.09 - Oct 21, 2009. Port to Linux. Preprocessor temporary files
+ now go in %TEMP% or $TEMP. TMPDIR not used. Optimized
+ decompressor now verifies header contents matches code.
+ File size display fixed for sizes over 2 GB. Added q option
+ (quiet) to suppress output. Compression shows preprocessed
+ size if different.
+
+v1.10 - Dec. 28, 2009. zpaq.cpp bug fix for g++ 4.4.1/Linux. Thanks to
+ Tom Hargreaves for a patch. zpaq.h is still v1.09.
--- zpaq-1.10.orig/debian/README.Debian
+++ zpaq-1.10/debian/README.Debian
@@ -0,0 +1,28 @@
+zpaq for Debian
+---------------
+
+A POSIX shell function to help to use zpaq's standard configuration
+files is provided. Add this call to your $HOME/.${SHELL}rc>:
+
+ . /usr/share/doc/zpaq/examples/zpaq.shellrc
+
+It will define "zpaq" function to accept short options -1, -3, -9 that
+make use of package's default compression levels min, medium and max
+supplied in directory /usr/share/doc/zpaq/examples/.
+
+An example; to create or appenf to archive with maximum level of
+compression:
+
+ # Create; acts like "-cCONFIG_MAX"
+ zpaq -9 archive.zpaq dir/*
+
+ # ... same as above; the "c" is default and be omitted.
+ zpaq -9c archive.zpaq dir/*
+
+ # Append mode
+ zpaq -9a archive.zpaq file
+
+ # Append mode; without saving a SHA1
+ zpaq -9b archive.zpaq file
+
+ -- Jari Aalto <jari.aalto@cante.net>, Fri, 21 May 2010 11:51:22 +0300
--- zpaq-1.10.orig/debian/compat
+++ zpaq-1.10/debian/compat
@@ -0,0 +1 @@
+7
--- zpaq-1.10.orig/debian/examples
+++ zpaq-1.10/debian/examples
@@ -0,0 +1,4 @@
+max.cfg
+mid.cfg
+min.cfg
+debian/*.shellrc
--- zpaq-1.10.orig/debian/control
+++ zpaq-1.10/debian/control
@@ -0,0 +1,22 @@
+Source: zpaq
+Section: utils
+Priority: optional
+Maintainer: Jari Aalto <jari.aalto@cante.net>
+Build-Depends: debhelper (>= 7.1)
+Standards-Version: 3.8.4
+Vcs-Browser: http://git.debian.org/?p=collab-maint/zpaq.git
+Vcs-Git: git://git.debian.org/git/collab-maint/zpaq.git
+Homepage: http://mattmahoney.net/dc
+
+Package: zpaq
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: maximum reference compressor for ZPAQ open standard
+ PAQ familily is a series of open source data compression archivers
+ that have evolved through collaborative development to top rankings
+ on several benchmarks measuring compression ratio although at the
+ expense of speed and memory usage.
+ .
+ This package includes ZPAQ, a proposed standard format for highly
+ compressed data that allows new compression algorithms to be
+ developed without breaking compatibility with older programs.
--- zpaq-1.10.orig/debian/unzpaq.1.pod
+++ zpaq-1.10/debian/unzpaq.1.pod
@@ -0,0 +1,125 @@
+# Copyright
+#
+# Copyright (C) 2009-2010 Jari Aalto
+#
+# License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Description
+#
+# To learn what TOP LEVEL section to use in manual pages,
+# see POSIX/Susv standard and "tility Description Defaults" at
+# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html#tag_01_11
+#
+# This is manual page in Perl POD format. Read more at
+# http://perldoc.perl.org/perlpod.html or run command:
+#
+# perldoc perlpod | less
+#
+# To check the syntax:
+#
+# podchecker *.pod
+#
+# Create manual page with command:
+#
+# pod2man PAGE.N.pod > PAGE.N
+
+=pod
+
+=head1 NAME
+
+unzpaq - PAQ ppen standard uncompressor
+
+=head1 SYNOPSIS
+
+ unzpaq [lx] archive.zpaq [file ...]
+
+=head1 DESCRIPTION
+
+PAQ is a series of open source data compression archivers that have
+evolved through collaborative development to top rankings on several
+benchmarks measuring compression ratio although at the expense of
+speed and memory usage.
+
+=head1 OPTIONS
+
+None.
+
+=over 4
+
+=item B<-h>
+
+Display short help.
+
+=back
+
+=head1 EXAMPLES
+
+Unzpaq lists or extracts an archive. To list the contents of an
+archive:
+
+ unzpaq l archive.zpaq
+
+Command C<x> Extracts and uncompress files. If no file names are
+given, then extract all files using the stored names. Skips
+(does not overwrite) existing files. If one or more file names
+are given, then extract that number of files and rename them,
+overwriting existing files, and ignoring any remaining files in
+the archive. An example:
+
+ zpaq x archive.zpaq
+
+=head1 ENVIRONMENT
+
+None.
+
+=head1 FILES
+
+None.
+
+=head1 STANDARDS
+
+See zpaq.pdf (ZPAQ Level 1 and later) in section AVAILABILITY . It is
+anticipated that future levels (ZPAQ-2, ZPAQ-3, etc.) will be backward
+compatible, such that newer levels can read archives produced by older
+programs.
+
+=head1 AVAILABILITY
+
+http://cs.fit.edu/~mmahoney/compression/#zpaq
+
+=head1 SEE ALSO
+
+C<bzip2(1)>
+C<gzip(1)>
+C<lzop(1)>
+C<lzma(1)>
+C<p7zip(1)>
+C<rzip(1)>
+C<unace(1)>
+C<unrar(1)>
+C<unzip(1)>
+C<zip(1)>
+
+=head1 AUTHORS
+
+Program was written by Matt Mahoney <matmahoney@yahoo.com>
+
+This manual page was put together by Jari Aalto
+<jari.aalto@cante.net>. Released under license GNU GPL version 2 or
+(at your option) any later version. For more information about
+license, visit <http://www.gnu.org/copyleft/gpl.html>.
+
+=cut
--- zpaq-1.10.orig/debian/install
+++ zpaq-1.10/debian/install
@@ -0,0 +1 @@
+zpaq usr/bin
--- zpaq-1.10.orig/debian/repack.sh
+++ zpaq-1.10/debian/repack.sh
@@ -0,0 +1,299 @@
+#!/bin/sh
+#
+# Copyright
+#
+# Copyright (C) 2008-2010 Jari Aalto <jari.aalto@cante.net>
+#
+# License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+set -u
+
+Initialize ()
+{
+ # Check depends
+
+ [ -x /bin/mktemp ] || Die "[ERROR]: mktemp (coreutils) not installed."
+ [ -x /bin/bzip2 ] || Die "[ERROR]: bzip2 (bzip2) not installed."
+ [ -x /bin/gzip ] || Die "[ERROR]: gzip (gzip) not installed."
+ [ -x /bin/tar ] || Die "[ERROR]: tar (tar) not installed."
+}
+
+InitializeZip ()
+{
+ [ -x /usr/bin/unzip ] || Die "[ERROR]: unzip (unzip) not installed."
+}
+
+Help ()
+{
+ echo "
+SYNOPSIS
+ repack.sh [--upstream-source] <ver> <downloaded file> [package]
+
+DESCRIPTION
+ Repackage upstream source. The command line arguments are due
+ to uscan(1) order. The PACKAGE argument is optional.
+
+ Can also repack *.zip files.
+
+OPTIONS
+ --upstream-source
+ Option is ignored. It is passed from uscan(1) when debian/watch
+ file is read.
+
+EXAMPLES
+ To repack foo-1.1.tar.gz into bar-1.10.tar.gz:
+
+ repack.sh 1.10 foo-1.1.tar.gz bar
+
+AUTHOR
+ Jari Aalto <jari.aalto@cante.net>. Licenced under GPL version 2 or,
+ at your option, any later version.
+"
+ exit 0
+}
+
+Run ()
+{
+ if [ "${test+test_mode}" = "test_mode" ]; then
+ echo "$@"
+ else
+ [ "${verbose+verbose_mode}" = "verbose_mode" ] && echo "$@" >&2
+ "$@"
+ fi
+}
+
+Warn ()
+{
+ echo "$*" >&2
+}
+
+Die ()
+{
+ Warn "$*"
+ exit 1
+}
+
+AtExit ()
+{
+ if [ "$DIR" ]; then
+ [ -d "$DIR" ] && rm -rf "$DIR"
+ fi
+}
+
+DebianVersion ()
+{
+ # No version conversions yet
+ echo $1
+}
+
+DebianTar ()
+{
+ local ver=$1
+ local dver=$2
+ local file=$3
+ local pkg=$4
+
+ # Convert tgz suffix
+
+ file=$(echo $file | sed -e 's,\(tgz\|zip\)$,tar.gz,' )
+
+
+ # If version is same, use original file
+
+ if [ "$ver" = "$dver" ]; then
+ if [ "$pkg" ]; then
+ echo $file | sed "s,.*$ver,${pkg}_$ver.orig,"
+ else
+ echo $file
+ fi
+ return 0
+ fi
+
+ if [ "$pkg" ]; then
+ echo $file | sed -e "s,.*$ver,${pkg}_$dver.orig,"
+ else
+ # replace with new version
+ echo $file | sed -e "s,$ver,$dver.orig,"
+ fi
+}
+
+Pkg ()
+{
+ local file=$1
+
+ if [ -f debian/changelog ]; then
+ dpkg-parsechangelog | awk '/^Source:/ {print $2}'
+ else
+
+ # package-1.1.tar.gz => package
+ echo $file | sed "s,-[0-9].*,,"
+ fi
+}
+
+Version ()
+{
+ local file=$1
+ local pkg=$(Pkg $file)
+
+ if [ ! "$pkg" ]; then
+ Die "[ERROR] Internal error. 'pkg' variable not set. Run with debug (-x)"
+ fi
+
+ echo $file |
+ sed -e "s,\.tar.*,," \
+ -e "s,\.tgz,," \
+ -e "s,\.tbz,," \
+ -e "s,\.tbz2,," \
+ -e "s,\.zip,," \
+ -e "s,\.7z,," \
+ -e "s,\.rar,," \
+ -e "s,\.lzma,," \
+ -e "s,$pkg[-_],,"
+}
+
+Main ()
+{
+ if [ $# -eq 0 ]; then
+ Help
+ fi
+
+ Initialize
+
+ case "$1" in
+ --help|-h)
+ Help
+ ;;
+ --*) shift
+ # Ignore uscan(1) argument --upstream-version in $1
+ ;;
+ esac
+
+ VER="$1"
+ FILENAME="$2"
+ DIR=
+
+ if [ ! -f "$FILENAME" ]; then
+ Die "[ERROR] Arg 2. File does not exist: $FILENAME"
+ fi
+
+ FILE_DIR=$(dirname $FILENAME)
+ FILE=$(basename $FILENAME)
+
+ PKG=${3:-$(Pkg $FILE)}
+
+ if [ ! "$PKG" ]; then
+ Die "[ERROR] Internal error. PKG not set. Run with debug (-x)"
+ fi
+
+ CURVER=$(Version $FILE)
+
+ if [ ! "$CURVER" ]; then
+ Die "[ERROR] Internal error. CURVER not set. Run with debug (-x)"
+ fi
+
+ DVER=$(DebianVersion "$VER")
+ DFILE=$(DebianTar "$CURVER" "$DVER" "$FILE" $PKG)
+
+ # Debian Developer's Reference 6.7.8.2 Repackaged upstream source
+
+ REPACK_DIR="$PKG-$DVER.orig"
+
+ DIR=$(mktemp -d ./tmp.repack.XXXXXX)
+
+ echo "Repacking $FILENAME as $PKG-$DVER"
+
+ # Create an extra directory to cope with tarballs that
+ # do not have root/ directory
+
+ UP_BASE="$DIR/unpack"
+ Run mkdir "$UP_BASE"
+
+ case "$FILENAME" in
+ *.gz | *.bz2 )
+
+ Run tar -C "$UP_BASE" -xf "$FILENAME"
+ ;;
+
+ *.zip)
+ InitializeZip
+
+ curdir=$(pwd)
+ adir=$(dirname $FILENAME)
+ name=$(basename $FILENAME)
+
+ Run cd $UP_BASE
+ Run unzip $curdir/$adir/$name || return 1
+
+ cd $curdir
+ ;;
+
+ *) Die "Unknonw file format: $FILENAME"
+ ;;
+ esac
+
+ if [ $(ls -1 "$UP_BASE" | wc -l) -eq 1 ]; then
+ # Tarball does contain a root directory
+ UP_BASE="$UP_BASE/$(ls -1 "$UP_BASE")"
+ fi
+
+ # Remove files
+
+ find $UP_BASE -iname "*.exe" -delete
+
+ # Repack
+
+ Run mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+ # Don't use pipes. Errors are not handled correctly if pipes aree used.
+
+ Run tar -C "$DIR" -cf "$DIR/repacked.tar" "$REPACK_DIR"
+
+ # The .orig file must uxe gzip compression
+
+ tar="$DIR/repacked.tar"
+
+ case "$DFILE" in
+ *.bz2)
+ DFILE=$(echo $DFILE | sed "s/.bz2/.gz/")
+ ;;
+ *.gz)
+ ;;
+ *.zip)
+ DFILE=$(echo $DFILE | sed "s/.zip/.gz/")
+ ;;
+ *)
+ Die "Unknown *.suffix in $DFILE"
+ ;;
+ esac
+
+ suffix=".gz"
+
+ Run gzip --best "$tar"
+
+ if [ -f "$DFILE" ]; then
+ echo "Warning, overwriting $DFILE"
+ fi
+
+ Run mv "$tar$suffix" "$DFILE"
+
+ echo "Done $DFILE"
+}
+
+trap AtExit QUIT INT EXIT
+Main "$@"
+
+# End of file
--- zpaq-1.10.orig/debian/changelog
+++ zpaq-1.10/debian/changelog
@@ -0,0 +1,5 @@
+zpaq (1.10-1) unstable; urgency=low
+
+ * Initial release (Closes: #582397).
+
+ -- Jari Aalto <jari.aalto@cante.net> Wed, 02 Jun 2010 11:12:41 +0300
--- zpaq-1.10.orig/debian/watch
+++ zpaq-1.10/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/^(.)/$1./" \
+ http://mattmahoney.net/dc .*zpaq(\d+).zip debian debian/repack.sh
--- zpaq-1.10.orig/debian/rules
+++ zpaq-1.10/debian/rules
@@ -0,0 +1,32 @@
+#!/usr/bin/make -f
+
+PACKAGE = zpaq
+CHANGELOG = debian/upstream.changelog
+CXX = g++
+
+# -DOPT Do not use (Upstream's note)
+# -DNDEBUG removes run time checks for better speed.
+
+LIBS = -lm
+CXXFLAGS += -I. -Wall -pedantic -DNDEBUG -fomit-frame-pointer
+
+get-changelog:
+ awk '/History/,/_eof_/ {print} ' readme.txt > $(CHANGELOG)
+
+man:
+ $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) makeman
+
+override_dh_installchangelogs: get-changelog
+ dh_installchangelogs $(CHANGELOG)
+
+override_dh_auto_build: get-changelog man
+ $(CXX) $(CXXFLAGS) -o $(PACKAGE) $(PACKAGE).cpp $(LIBS)
+# Skip. No use for regular user
+# $(CXX) $(CXXFLAGS) -o lzppre lzppre.cpp $(LIBS)
+
+%:
+ dh $@
+
+.PHONY: get-changelog man
+
+# End of file
--- zpaq-1.10.orig/debian/docs
+++ zpaq-1.10/debian/docs
@@ -0,0 +1 @@
+readme.txt
--- zpaq-1.10.orig/debian/copyright
+++ zpaq-1.10/debian/copyright
@@ -0,0 +1,87 @@
+This work was packaged for Debian by:
+
+ Jari Aalto <jari.aalto@cante.net>
+ on 2010-05-20 16:06:57+0300
+
+It was downloaded from:
+
+ http://mattmahoney.net/dc
+
+ The original *.zip was repacked with debian/repack.sh (run
+ automatically from debian/watch). Modifications: remove *.exe
+ files.
+
+Upstream Author:
+
+ Matt Mahoney <matmahoney@yahoo.com>
+
+Copyright:
+
+ Copyright (C) 2009 Matt Mahoney <matmahoney@yahoo.com> and Ocarinza Networks Inc
+ Copyright (C) 2001 The Internet Society
+
+License:
+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+
+ - - -
+
+ [From file "LICENSE"]
+
+ LICENSE description added by Matt Mahoney on May 23, 2010.
+
+ All code with the exception of the SHA1 class is Copyright (C), Ocarina
+ Networks Inc, as dated in the source code, and is licensed under the GNU
+ General Public License, version 3. The SHA1 class is derived from
+ code in RFC-3174, which is Copyright (C), 2001, The Internet Society.
+ Both licenses are included below.
+
+ --------------------------------------------------------------------------
+
+ License for code derived from RFC-3174 (class SHA1).
+ Source: http://datatracker.ietf.org/doc/rfc3174/
+
+ Copyright (C) The Internet Society (2001). All Rights Reserved.
+
+ This document and translations of it may be copied and furnished to
+ others, and derivative works that comment on or otherwise explain it
+ or assist in its implementation may be prepared, copied, published
+ and distributed, in whole or in part, without restriction of any
+ kind, provided that the above copyright notice and this paragraph are
+ included on all such copies and derivative works. However, this
+ document itself may not be modified in any way, such as by removing
+ the copyright notice or references to the Internet Society or other
+ Internet organizations, except as needed for the purpose of
+ developing Internet standards in which case the procedures for
+ copyrights defined in the Internet Standards process must be
+ followed, or as required to translate it into languages other than
+ English.
+
+ The limited permissions granted above are perpetual and will not be
+ revoked by the Internet Society or its successors or assigns.
+
+ This document and the information contained herein is provided on an
+ "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
+ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+ BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
+ HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+The Debian packaging is licensed under the GPL version 2, or (at your
+option), any later version, and is:
+
+ Copyright (C) 2010 Jari Aalto <jari.aalto@cante.net>
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in "/usr/share/common-licenses/GPL-2".
--- zpaq-1.10.orig/debian/zpaq.shellrc
+++ zpaq-1.10/debian/zpaq.shellrc
@@ -0,0 +1,75 @@
+#!/bin/sh
+#
+# Copyright
+#
+# Copyright (C) 2009-2010 Jari Aalto <jari.aalto@cante.net>,
+#
+# License:
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Description
+#
+# A shell function to help to use zpaq in Debian.
+#
+# Create; option -9 acts like "-cCONFIG_MAX"
+#
+# zpaq -9 archive.zpaq dir/*
+#
+# Same as above; the "c" is default and be omitted.
+#
+# zpaq -9c archive.zpaq dir/*
+#
+# Append mode
+#
+# zpaq -9a archive.zpaq file
+#
+# Append mode; without saving a SHA1
+#
+# zpaq -9b archive.zpaq file
+
+zpaq ()
+{
+ unset zpaq_dir
+ unset zpaq_conf
+ unset zpaq_mode
+
+ local zpaq_dir 2> /dev/null
+ local zpaq_conf 2> /dev/null
+ local zpaq_mode 2> /dev/null
+
+ zpaq_dir=/usr/share/doc/zpaq/examples
+
+ case "$1" in
+ -1*) zpaq_conf=$zpaq_dir/min.cfg ;;
+ -3*) zpaq_conf=$zpaq_dir/mid.cfg ;;
+ -9*) zpaq_conf=$zpaq_dir/max.cfg ;;
+ esac
+
+ unset zpaq_dir # No more used.
+
+ case "$1" in
+ -[139] | -[139]c) zpaq_mode="c" ;;
+ -[139]a) zpaq_mode=a ;;
+ -[139]b) zpaq_mode=b ;;
+ esac
+
+ if [ "$zpaq_mode" ]; then
+ shift
+ fi
+
+ /usr/bin/zpaq $zpaq_mode$zpaq_conf "$@"
+}
+
+# End of file
--- zpaq-1.10.orig/debian/zpaq.1.pod
+++ zpaq-1.10/debian/zpaq.1.pod
@@ -0,0 +1,422 @@
+# Copyright
+#
+# Copyright (C) 2009-2010 Jari Aalto
+#
+# License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Description
+#
+# To learn what TOP LEVEL section to use in manual pages,
+# see POSIX/Susv standard and "Utility Description Defaults" at
+# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html#tag_01_11
+#
+# This is manual page in Perl POD format. Read more at
+# http://perldoc.perl.org/perlpod.html or run command:
+#
+# perldoc perlpod | less
+#
+# To check the syntax:
+#
+# podchecker *.pod
+#
+# Create manual page with command:
+#
+# pod2man PAGE.N.pod > PAGE.N
+
+=pod
+
+=head1 NAME
+
+zpaq - PAQ open standard maximum compressor
+
+=head1 SYNOPSIS
+
+ create : zpaq [opnsitqv]c<config>[,N...] archive.zpaq file [file ...]
+ append : zpaq [opnsitqv]a<config>[,N...] archive.zpaq file [file ...]
+ list : zpaq l archive.zpaq
+ extract: zpaq [opntq]x[N] archive.zpaq
+ debug : zpaq [pthv]rF[,N...] [args...]
+
+=head1 DESCRIPTION
+
+=head2 General
+
+PAQ is a series of open source data compression archivers that have
+evolved through collaborative development to top rankings on several
+benchmarks measuring compression ratio although at the expense of
+speed and memory usage.
+
+Zpaq ia a proposed standard format for highly compressed data that
+allows new compression algorithms to be developed without breaking
+compatibility with older programs. Zpaq is based on PAQ-like context
+mixing algorithms which are top ranked on many benchmarks. The format
+supports archivers, single file compressors, and memory to memory
+compression.
+
+ZPAQ is a configurable file compressor and archiver. Its goal
+is a high compression ratio in an open format without loss of
+compatibility between versions as advanced compression techniques
+are discovered.
+
+Compression uses by default built-in configuration files. Three
+examples are supplied:
+
+ min.cfg - Fast, minimal compression (LZP + order 3). Requires 4 MB memory.
+ mid.cfg - Average compression and speed. Requires 111 MB.
+ max.cfg - Slow but good compression. Requires 278 MB.
+
+The config file is not needed to extract.
+
+NOTE: in extract mode, if the FILES are listed the files are renamed
+during written out.
+
+head2 Commands
+
+=over 4
+
+=item B<a>
+
+Append to archive.
+
+=item B<c>
+
+Create archive.
+
+=item B<i>
+
+Don't store file sizes as comments (saves a few bytes). Normally the
+input file size is stored as a decimal string, taking a few bytes. The
+comment field has no effect on the program except that it is displayed
+by the B<l> and B<x> commands.
+
+=item B<l>
+
+List contents of archive.
+
+=item B<n>
+
+I<In create mode>: Don't store filenames (names will be needed to
+decompress). I<In extract mode>: decompress all to one file. The
+effect is to require that filenames be given during decompression.
+
+During extract ignore all stored filenames and append all output to
+one file, the first file in [files...].
+
+=item B<o>
+
+Optimize (run faster). You need a C++ compiler installed to use this
+option. If not, drop the "o". You can still use zpaq but it will take
+about twice as long to run.
+
+If successful, compression is typically 50% to 100% faster. Zpaq will
+look for a program named C<zpaq_X> in the temporary directory, where X
+is derived from the SHA1 checksum of the block header produced by
+config file I<CONFIG> with arguments I<N>. If the program exists, then
+Zpaq will call it with the same arguments to perform the compression.
+If it does not exist then Zpaq will create a source code file
+C<zpaq_X.cpp> in the temporary directory, compile it, and link it to
+C<zpaq.cpp> or C<zpaq.o> depending on the installation.
+
+The temporary directory is specified by the environment variable
+TEMP if it exists, or else the current directory.
+
+The program C<zpaq_X> will compress its input in the same format as
+described by I<CONFIG>, but faster. If I<CONFIG> specifies a
+preprocessor, then C<zpaq_X> will expect to find it too. It will also
+decompress archive blocks in the same configuration but fail if it
+attempts to decompress blocks in any other configuration.
+
+Program C<zpaq_X> will accept the B<c>, B<a> and B<x> commands with
+all of the same modifiers, but will ignore the B<v> and B<o> modifiers
+and ignore any CONFIG file and arguments passed to it. It will not
+accept the B<l> or B<r> commands. Extraction requires a block number
+("x1", "x2", etc). A different optimized program is used to extract
+each block.
+
+Zpaq will call the external program C<zpaqmake> to compile
+C<zpaq_X.cpp>, passing it C<zpaq_X> as an argument. Normally this will
+be a script that calls a C++ compiler to produce C<zpaq_X.o>, links to
+C<zpaq.o> and outputs C<zpaq_X>. The script could link to C<zpaq.cpp>
+instead of C<zpaq.o>.
+
+=item B<p>
+
+I<In create mode>: Store filename paths in archive. The default is to
+store the name without the path. For example:
+
+ zpaq pc<CONFIG> books.zpaq dir/file
+
+will store the name as C<dir/file>. If the B<p> option is also given
+during extraction, then ZPAQ will attempt to extract C<file> to the
+subdirectory instead of the current directory. This will fail if
+directory does not exist. ZPAQ does not create directories as needed.
+
+I<In extract mode>: extract to stored paths instead of current
+directory
+
+The default is to extract to the current directory regardless of how
+the file names are stored. Stored paths must be relative to the
+current directory, not start with a "/", "\", a drive letter like "C:"
+or contain "../" or "..\". If extracting to a subdirectory, it must
+already exist. It will not be created.
+
+[files...] overrides and has no restrictions on file names. Each
+segment extracts to a different file. If any segments do not have a
+stored filename then they can only be extracted using the B<p> or B<n>
+modifiers.
+
+=item B<q>
+
+Quiet mode. Don't display compression progress on the screen.
+
+=item B<s>
+
+Don't store SHA1 checksums (saves 20 bytes).The decompressor will not
+check that the output is identical to the original input.
+
+=item B<t>
+
+I<In create mode>: Append locator tag to non-ZPAQ data.
+
+Append a locator tag to non-ZPAQ data. The tag is a string of 13 bytes
+that allows ZPAQ and UNZPAQ to find the start of a sequence of ZPAQ
+blocks embedded in other data. Program C<zpaqsfx> already has this tag
+at the end. However, if a new stub is compiled from the source then
+the B<t> command should be used when appending the first file.
+
+I<In extract mode>: don't post-process (for debugging). Expect
+checksum errors.
+
+=item B<v>
+
+Verbose mode. Show CONFIG file as it compiles. This is useful for
+error checking.
+
+=item B<x>
+
+Extract. Use "ox" to extract fast. You can extract more slowly with
+plain "x" if you don't have C++ installed. Output files are renamed in
+the same order they are stored and listed. If you don't rename the
+output files, then the files will be extracted to the current
+directory with the same names they had when stored.
+
+=item B<,N>
+
+Usd in create mode. Pass numeric arguments to CONFIG file. Appended
+suffix like ",2" means use 4 times more memory. Each increment doubles
+usage. You need the same memory to decompress.
+
+=item B<N>
+
+I<Used in extract mode>. Extract only block N (1, 2, 3...), where 1 is
+the first block. Otherwise all blocks are extracted. The B<l> command
+shows which files are in each block.
+
+=back
+
+=head2 Debug and Development Options
+
+To debug CONFIG file, use:
+
+ zpaq [pthv]r<CONFIG>[,N...] [args...]
+
+the B<r> runn the ZPAQL program in HCOMP section of configuration file
+F. The program is run once for each byte of input from the file named
+in the first argument and once at EOF with the input byte (or -1) in
+the A register. Output is to the file named in the second argument. If
+run with no arguments then take input from stdin and output to stdout.
+Modifiers are listed below.
+
+=over 4
+
+=item B<h>
+
+When tracing, display register and memory contents in hexadecimal
+instead of decimal.
+
+=item B<p>
+
+Run PCOMP (default is to run HCOMP).
+
+=item B<t>
+
+Trace (single step), args are numeric inputs otherwise args are input,
+output (default stdin, stdout). The arguments should be numbers rather
+than file names. The program is run once for each argument with the
+value in the A register. As each instruction is executed the register
+contents are shown. At HALT, memory contents are displayed.
+
+=item B<v>
+
+Verbose compile. Display the CONFIG file as it is being compiled. If
+an error occurs, it will be easier to locate. Modifier B<v> is also
+useful for displaying jump targets.
+
+=item B<,N>
+
+Pass numeric arguments to CONFIG file. Pass up to 9 numeric arguments
+to CONFIG file (like the B<c> and B<a> commands).
+
+=back
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-h>
+
+Display short help.
+
+=back
+
+=head1 EXAMPLES
+
+=head2 Create
+
+To create an archive:
+
+ zpaq c<CONFIG> archive.zpaq files ...
+
+If the archive exists then it is overwritten. File names are stored
+without a path.
+
+=head2 Append
+
+To (a)ppend to an existing archive. If the archive does not exist then
+it is created as with the c command:
+
+ zpaq a<CONFIG> archive.zpaq files ...
+
+=head2 List
+
+To list the contents of an archive. Files are listed in the same order
+they were added:
+
+ zpaq l archive.zpaq
+
+To extract the contents of the archive. New files are created and
+named according to the stored filenames. Does not clobber existing
+files. Extracts to current directory:
+
+ zpaq x archive.zpaq
+
+If the files to be extracted already exist, then zpaq will
+refuse to clobber them and skip to the next file. If the files
+are compressed with a path (folder or directory), then that
+directory must exist when the file is extracted. zpaq will
+not create directories.
+
+To extract files and renames in the order they were added to the
+archive. Clobbers any already existing output files. The number of
+files extracted is the smaller of the number of filenames on the
+command line or the number of files in the archive.
+
+ zpaq x archive.zpaq file ...
+
+=head2 Extract
+
+To extract and rename:
+
+ zpaq x archive.zpaq files ...
+ unzpaq x archive.zpaq files ...
+
+Files are extracted in the same order they are saved and renamed.
+Unlike using stored names, if the file exists, then it is
+overwritten (clobbered). Only files named on the command line
+are extracted. Any additional files in the archive are ignored.
+For example:
+
+ zpaq x archive.zpaq foo bar
+
+To extracts files like B<x>, but without post-processing. This may be
+useful for debugging or developing config files:
+
+ zpaq t archive.zpaq [files ...]
+
+=head2 Config file
+
+The distribution contain several default CONFIG files:
+
+ min.cfg - for fast but poor compression.
+ max.cfg - for slow but good compression.
+ mid.cfg - for moderate speed and compression (default).
+
+Other config files are available as add-on options or you can write
+them as explained later.
+
+A numeric argument may be appended to CONGIF to increase memory usage
+for better compression. Each increment doubles usage. There should be
+no space before or after the comma. For example:
+
+ zpaq cmax.cfg archive files... = 246 MB
+ zpaq cmax.cfg,1 archive files... = 476 MB
+ zpaq cmax.cfg,2 archive files... = 938 MB
+ zpaq cmax.cfg,3 archive files... = 1861 MB
+ zpaq cmax.cfg,-1 archive files... = 130 MB (negative values allowed)
+
+Modifiers may be in any order before the "c" or "a" command. The
+modifiers, command, and configuration file must be written together
+without any spaces. An example: to create archive with options B<i, p,
+s> and configuration file C<max.cfg>. Modifiers have the following
+meaning:
+
+ zpaq ipsc<CONFIG> archive.zpaq file1 file22
+
+=head1 ENVIRONMENT
+
+Temporary directory B<TEMPDIR> is use during optimize command B<o>.
+
+None.
+
+=head1 FILES
+
+Compression commands B<c> and B<a> need a configuration file. See examples in
+directory C</usr/share/doc/zpaq>.
+
+=head1 STANDARDS
+
+See zpaq*.pdf (ZPAQ Level 1 and later) in section AVAILABILITY . It is
+anticipated that future levels (ZPAQ-2, ZPAQ-3, etc.) will be backward
+compatible, such that newer levels can read archives produced by older
+programs.
+
+=head1 AVAILABILITY
+
+http://mattmahoney.net/dc
+
+=head1 SEE ALSO
+
+C<bzip2(1)>
+C<gzip(1)>
+C<lzop(1)>
+C<lzma(1)>
+C<p7zip(1)>
+C<rzip(1)>
+C<unace(1)>
+C<unrar(1)>
+C<unzip(1)>
+C<zip(1)>
+
+=head1 AUTHORS
+
+Program was written by Matt Mahoney <matmahoney@yahoo.com>
+
+This manual page was put together by Jari Aalto
+<jari.aalto@cante.net>. under license GNU GPL version 2 or (at your
+option) any later version. For more information about license, visit
+<http://www.gnu.org/copyleft/gpl.html>.
+
+=cut
--- zpaq-1.10.orig/debian/pod2man.mk
+++ zpaq-1.10/debian/pod2man.mk
@@ -0,0 +1,66 @@
+# pod2man.mk -- Makefile portion to convert *.pod files to manual pages
+#
+# Copyright information
+#
+# Copyright (C) 2008-2010 Jari Aalto
+#
+# License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Description
+#
+# Convert *.pod files to manual pages. Write this to 'install'
+# target:
+#
+# install: build $(MANPAGE)
+
+ifneq (,)
+ This makefile requires GNU Make.
+endif
+
+# This variable *must* be set when called
+PACKAGE ?= package
+
+# Optional variables to set
+MANSECT ?= 1
+PODCENTER ?= User Commands
+PODDATE = $$(date "+%Y-%m-%d")
+
+# Directories
+MANSRC =
+MANDEST = $(MANSRC)
+
+MANPOD = $(MANSRC)$(PACKAGE).$(MANSECT).pod
+MANPAGE = $(MANDEST)$(PACKAGE).$(MANSECT)
+
+POD2MAN = pod2man
+POD2MAN_FLAGS = --utf8
+
+makeman: $(MANPAGE)
+
+$(MANPAGE): $(MANPOD)
+ # make target - create manual page from a *.pod page
+ podchecker $(MANPOD)
+ LC_ALL= LANG=C $(POD2MAN) $(POD2MAN_FLAGS) \
+ --center="$(PODCENTER)" \
+ --date="$(PODDATE)" \
+ --name="$(PACKAGE)" \
+ --section="$(MANSECT)" \
+ $(MANPOD) \
+ | sed 's,[Pp]erl v[0-9.]\+,$(PACKAGE),' \
+ > $(MANPAGE) && \
+ rm -f pod*.tmp
+
+# End of of Makefile part
--- zpaq-1.10.orig/debian/clean
+++ zpaq-1.10/debian/clean
@@ -0,0 +1,4 @@
+zpaq
+unzpaq
+lzppre
+debian/*.1
--- zpaq-1.10.orig/debian/manpages
+++ zpaq-1.10/debian/manpages
@@ -0,0 +1 @@
+debian/*.1
--- zpaq-1.10.orig/debian/source/format
+++ zpaq-1.10/debian/source/format
@@ -0,0 +1 @@
+1.0