Zpaq open standard maximum compressor with prebuilt compression levels
create : zp cN archive.zpaq file [file ...] append : zp aN archive.zpaq file [file ...] list : zp l archive.zpaq extract: zp [ex][N] archive.zpaq
\s-1PAQ\s0 family was 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.
\s-1ZPAQ\s0 ia a proposed standard format for highly compressed data that allows new compression algorithms to be developed without breaking compatibility with older programs. Zp 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.
Zp's goal is a high compression ratio in an open format without loss of compatibility between versions as advanced compression techniques are discovered.
If you compress in Windows and extract in Linux, then the program will change \*(L"\\*(R" to \*(L"/\*(R" during extraction and vice versa. Slashes can be stored with either convention. The program guesses the operating system by counting \*(L"/\*(R" and \*(L"\\*(R" in the \s-1PATH\s0 environment variable. If this heuristic fails (\s-1PATH\s0 not defined) then no slash translation is done.
Paths must be relative to the current directory. The program will warn if you store an absolute path. You can only extract such files with command e or by overriding the filename.
zp c archive.zpaq /dir/file (Warning: starts with "/") zp x archive.zpaq (Error: bad filename) zp e archive.zpaq (OK: extracts file1 to current directory) zp x archive.zpaq newfile (OK: extracts newfile to current directory) zp x archive.zpaq /dir/file (OK: creates /dir if needed)
Also, the same rule applies to file names containing control characters, or longer than 511 characters, or that start with a drive letter like \*(C`C:\*(C' or contain relative \*(C`..\*(C' paths.
If this program is run in Linux or \s-1UNIX\s0 or compiled with g++ in Windows then it will interpret wildcards on the command line in the usual way. A * matches any string and ? matches any character.
zp c archive.zpaq *
will compress all files in the current directory to \*(C`archive.zpaq\*(C'. However, it will not recurse directories. You need to specify the files in each directory that you want to add.
The program does not save file timestamps or permissions like some other archivers do. Extracted files are dated from the time of extraction with default permissions. If you need these capabilities, then create a tar file and compress that instead.
The compression option 1, 2, or 3 means compress fast, medium, or best respectively. Better compression requires more time and memory. Decompression speed and memory are the same as for compression. Speed (T3200, 2.0 GHz) and memory usage are as follows. The following table shows comparison to \*(C`zip -9\*(C' compression All modes compress better but slower than zip.
Memory Speed Calgary corpus ------ ----------- --------------- 1 (fast) 38 MB 0.7 sec/MB 807,214 bytes 2 (default) 111 MB 2.3 sec/MB 699,586 bytes 3 (small) 246 MB 6.4 sec/MB 644,545 bytes zip -9 <1 MB 0.13 sec/MB 1,020,719 bytes
zp\|(1) uses compiled \s-1ZPAQL\s0 (generated by \*(C`zpaq oc\*(C') to compress and extract in each of the 3 modes about twice as fast as using interpreted code. It automatically recognizes these configurations even if they are produced by other programs. The default compression is the same as the default produced by zpaq\|(1) and zpipe\|(1). If another program produces a different configuration, then this program will still correctly decompress it by interpreting the code, which is slower. Also, zpaq\|(1), unzpaq\|(1), and zpipe\|(1) can decompress archives produced by this program.
The program stores a filename, comment, and \s-1SHA-1\s0 checksum for each file. Other programs may omit these, but this program will still be able to decompress them. This program follows the convention that if the name is omitted, then the contents should be appended to the previous file. If the first filename is omitted, then you must supply it on the command line during extraction. Each filename on the command line replaces one named file in the archive.
head2 Commands
Append to archive. Value N regulates the speed of compression using the specified digit: 1 (fast, less compression), 2 (medium, default), 3 (best, highest compression).
Create archive. Value N regulates the speed of compression using the specified digit: 1 (fast, less compression), 2 (medium, default), 3 (best, highest compression).
Extract to current directory. With N, extract only block N (1, 2, 3...), where 1 is the first block. Otherwise all blocks are extracted. The l command shows which files are in each block.
List contents of archive.
Extract with full path names (files... overrides stored names). With N, extract only block N (1, 2, 3...), where 1 is the first block. Otherwise all blocks are extracted. The l command shows which files are in each block.
None.
The archive name must end with .zpaq. All commands will add the extension automatically if you don't specify it.
To create an archive:
zp c3 archive.zpaq files ...
File names are stored in the archive as they appear on the command line. If you specify a path to a different directory, the path is stored, and created during extraction. The e command extracts to the current directory.
To (a)ppend to an existing archive. If the archive does not exist then it is created as with the c command. The files are grouped into blocks (solid archive) for each command (see l command).
zp a3 archive.zpaq files ...
To list the contents of an archive. Files are listed in the same block order they were added:
zp l archive.zpaq
To extract the contents of the archive:
zp x archive.zpaq
To extract specific block (see l command output):
zp x1 archive.zpaq
Blocks are \*(L"solid\*(R" which means you cannot extract files within a block without extracting the earlier files. To extract first file in block under another name:
zp x1 archive.zpaq other-name
Program will not overwrite existing files during extraction unless you specify the filenames on the command line:
zp x archive.zpaq (Error: file1 exists) zp x archive.zpaq file1 file2 (Overwrite file1, file2)
\s-1PATH\s0 is checked for detecting if slash conversions are required. An empty value will disable conversions.
None.
See zpaq*.pdf (\s-1ZPAQ\s0 Level 1 and later) in section \s-1AVAILABILITY\s0. It is anticipated that future levels (\s-1ZPAQ-2\s0, \s-1ZPAQ-3\s0, etc.) will be backward compatible, such that newer levels can read archives produced by older programs.
http://mattmahoney.net/dc
bzip2\|(1) gzip\|(1) lzma\|(1) lzop\|(1) p7zip\|(1) rzip\|(1) unace\|(1) unrar\|(1) unzip\|(1) zip\|(1) zpaq\|(1)
Program was written by Matt Mahoney <[email protected]>
This manual page was written by Jari Aalto <[email protected]>. Released under license \s-1GNU\s0 \s-1GPL\s0 version 3 or (at your option) any later version. For more information about license, visit <http://www.gnu.org/copyleft/gpl.html>.