summaryrefslogtreecommitdiffstats
path: root/doc/clzip.texinfo
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 11:29:58 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 11:29:58 +0000
commit72be44917bc19be536d1413c0f122cf5f2414263 (patch)
treede59e3cdd43e922654d43b2bbcb60e7e5936ed2c /doc/clzip.texinfo
parentAdding debian version 1.0-1. (diff)
downloadclzip-72be44917bc19be536d1413c0f122cf5f2414263.tar.xz
clzip-72be44917bc19be536d1413c0f122cf5f2414263.zip
Merging upstream version 1.1~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'doc/clzip.texinfo')
-rw-r--r--doc/clzip.texinfo194
1 files changed, 122 insertions, 72 deletions
diff --git a/doc/clzip.texinfo b/doc/clzip.texinfo
index acdd3bc..55cbb79 100644
--- a/doc/clzip.texinfo
+++ b/doc/clzip.texinfo
@@ -5,8 +5,8 @@
@finalout
@c %**end of header
-@set UPDATED 5 April 2010
-@set VERSION 1.0
+@set UPDATED 7 December 2010
+@set VERSION 1.1-rc2
@dircategory Data Compression
@direntry
@@ -14,9 +14,10 @@
@end direntry
+@ifnothtml
@titlepage
@title Clzip
-@subtitle A data compressor based on the LZMA algorithm
+@subtitle Data compressor based on the LZMA algorithm
@subtitle for Clzip version @value{VERSION}, @value{UPDATED}
@author by Antonio Diaz Diaz
@@ -25,6 +26,7 @@
@end titlepage
@contents
+@end ifnothtml
@node Top
@top
@@ -32,13 +34,13 @@
This manual is for Clzip (version @value{VERSION}, @value{UPDATED}).
@menu
-* Introduction:: Purpose and features of clzip
-* Algorithm:: How clzip compresses the data
-* Invoking Clzip:: Command line interface
-* File Format:: Detailed format of the compressed file
-* Examples:: A small tutorial with examples
-* Problems:: Reporting bugs
-* Concept Index:: Index of concepts
+* Introduction:: Purpose and features of clzip
+* Algorithm:: How clzip compresses the data
+* Invoking Clzip:: Command line interface
+* File Format:: Detailed format of the compressed file
+* Examples:: A small tutorial with examples
+* Problems:: Reporting bugs
+* Concept Index:: Index of concepts
@end menu
@sp 1
@@ -90,10 +92,12 @@ The amount of memory required for compression is about 5 MiB plus 1 or 2
times the dictionary size limit (1 if input file size is less than
dictionary size limit, else 2) plus 8 times the dictionary size really
used. For decompression it is a little more than the dictionary size
-really used. Clzip will automatically use the smallest possible
-dictionary size without exceeding the given limit. It is important to
-appreciate that the decompression memory requirement is affected at
-compression time by the choice of dictionary size limit.
+really used.
+
+Clzip will automatically use the smallest possible dictionary size
+without exceeding the given limit. Keep in mind that the decompression
+memory requirement is affected at compression time by the choice of
+dictionary size limit.
When decompressing, clzip attempts to guess the name for the decompressed
file from that of the compressed file as follows:
@@ -126,14 +130,12 @@ caused clzip to panic.
@cindex algorithm
Clzip implements a simplified version of the LZMA (Lempel-Ziv-Markov
-chain-Algorithm) algorithm. The original LZMA algorithm was designed by
-Igor Pavlov.
-
-The high compression of LZMA comes from combining two basic, well-proven
-compression ideas: sliding dictionaries (LZ77/78) and markov models (the
-thing used by every compression algorithm that uses a range encoder or
-similar order-0 entropy coder as its last stage) with segregation of
-contexts according to what the bits are used for.
+chain-Algorithm) algorithm. The high compression of LZMA comes from
+combining two basic, well-proven compression ideas: sliding dictionaries
+(LZ77/78) and markov models (the thing used by every compression
+algorithm that uses a range encoder or similar order-0 entropy coder as
+its last stage) with segregation of contexts according to what the bits
+are used for.
Clzip is a two stage compressor. The first stage is a Lempel-Ziv coder,
which reduces redundancy by translating chunks of data to their
@@ -175,6 +177,14 @@ member or volume size limits are reached.
10) If there are more data to compress, go back to step 1.
+@sp 1
+@noindent
+The ideas embodied in clzip are due to (at least) the following people:
+Abraham Lempel and Jacob Ziv (for the LZ algorithm), Andrey Markov (for
+the definition of Markov chains), G.N.N. Martin (for the definition of
+range encoding), Igor Pavlov (for putting all the above together in
+LZMA), and Julian Seward (for bzip2's CLI and the idea of unzcrash).
+
@node Invoking Clzip
@chapter Invoking Clzip
@@ -192,47 +202,47 @@ clzip [@var{options}] [@var{files}]
Clzip supports the following options:
@table @samp
-@item --help
-@itemx -h
+@item -h
+@itemx --help
Print an informative help message describing the options and exit.
-@item --version
-@itemx -V
+@item -V
+@itemx --version
Print the version number of clzip on the standard output and exit.
-@item --member-size=@var{size}
-@itemx -b @var{size}
+@item -b @var{size}
+@itemx --member-size=@var{size}
Produce a multimember file and set the member size limit to @var{size}
bytes. Minimum member size limit is 100kB. Small member size may degrade
compression ratio, so use it only when needed. The default is to produce
-single member files.
+single-member files.
-@item --stdout
-@itemx -c
+@item -c
+@itemx --stdout
Compress or decompress to standard output. Needed when reading from a
named pipe (fifo) or from a device. Use it to recover as much of the
uncompressed data as possible when decompressing a corrupt file.
-@item --decompress
-@itemx -d
+@item -d
+@itemx --decompress
Decompress.
-@item --force
-@itemx -f
+@item -f
+@itemx --force
Force overwrite of output file.
-@item --keep
-@itemx -k
+@item -k
+@itemx --keep
Keep (don't delete) input files during compression or decompression.
-@item --match-length=@var{length}
-@itemx -m @var{length}
-Set the match length limit in bytes. Valid values range from 5 to 273.
-Larger values usually give better compression ratios but longer
-compression times.
+@item -m @var{length}
+@itemx --match-length=@var{length}
+Set the match length limit in bytes. After a match this long is found,
+the search is finished. Valid values range from 5 to 273. Larger values
+usually give better compression ratios but longer compression times.
-@item --output=@var{file}
-@itemx -o @var{file}
+@item -o @var{file}
+@itemx --output=@var{file}
When reading from standard input and @samp{--stdout} has not been
specified, use @samp{@var{file}} as the virtual name of the uncompressed
file. This produces a file named @samp{@var{file}} when decompressing, a
@@ -240,34 +250,38 @@ file named @samp{@var{file}.lz} when compressing, and several files
named @samp{@var{file}00001.lz}, @samp{@var{file}00002.lz}, etc, when
compressing and splitting the output in volumes.
-@item --quiet
-@itemx -q
+@item -q
+@itemx --quiet
Quiet operation. Suppress all messages.
-@item --dictionary-size=@var{size}
-@itemx -s @var{size}
+@item -s @var{size}
+@itemx --dictionary-size=@var{size}
Set the dictionary size limit in bytes. Valid values range from 4KiB to
512MiB. Clzip will use the smallest possible dictionary size for each
member without exceeding this limit. Note that dictionary sizes are
quantized. If the specified size does not match one of the valid sizes,
it will be rounded upwards.
-@item --volume-size=@var{size}
-@itemx -S @var{size}
+For maximum compression you should use a dictionary size limit as large
+as possible, but keep in mind that the decompression memory requirement
+is affected at compression time by the choice of dictionary size limit.
+
+@item -S @var{size}
+@itemx --volume-size=@var{size}
Split the compressed output into several volume files with names
@samp{original_name00001.lz}, @samp{original_name00002.lz}, etc, and set
the volume size limit to @var{size} bytes. Each volume is a complete,
maybe multimember, lzip file. Minimum volume size limit is 100kB. Small
volume size may degrade compression ratio, so use it only when needed.
-@item --test
-@itemx -t
+@item -t
+@itemx --test
Check integrity of the specified file(s), but don't decompress them.
This really performs a trial decompression and throws away the result.
-Use @samp{-tvv} or @samp{-tvvv} to see information about the file.
+Use it together with @samp{-v} to see information about the file.
-@item --verbose
-@itemx -v
+@item -v
+@itemx --verbose
Verbose mode. Show the compression ratio for each file processed.
Further -v's increase the verbosity level.
@@ -276,16 +290,22 @@ Set the compression parameters (dictionary size and match length limit)
as shown in the table below. Note that @samp{-9} can be much slower than
@samp{-1}. These options have no effect when decompressing.
+The bidimensional parameter space of LZMA can't be mapped to a linear
+scale optimal for all files. If your files are large, very repetitive,
+etc, you may need to use the @samp{--match-length} and
+@samp{--dictionary-size} options directly to achieve optimal
+performance.
+
@multitable {Level} {Dictionary size} {Match length limit}
@item Level @tab Dictionary size @tab Match length limit
-@item -1 @tab 1 MiB @tab 10 bytes
-@item -2 @tab 1.5 MiB @tab 12 bytes
-@item -3 @tab 2 MiB @tab 17 bytes
-@item -4 @tab 3 MiB @tab 26 bytes
-@item -5 @tab 4 MiB @tab 44 bytes
-@item -6 @tab 8 MiB @tab 80 bytes
-@item -7 @tab 16 MiB @tab 108 bytes
-@item -8 @tab 24 MiB @tab 163 bytes
+@item -1 @tab 1 MiB @tab 5 bytes
+@item -2 @tab 1.5 MiB @tab 6 bytes
+@item -3 @tab 2 MiB @tab 8 bytes
+@item -4 @tab 3 MiB @tab 12 bytes
+@item -5 @tab 4 MiB @tab 20 bytes
+@item -6 @tab 8 MiB @tab 36 bytes
+@item -7 @tab 16 MiB @tab 68 bytes
+@item -8 @tab 24 MiB @tab 132 bytes
@item -9 @tab 32 MiB @tab 273 bytes
@end multitable
@@ -350,7 +370,7 @@ All multibyte values are stored in little endian order.
@table @samp
@item ID string
-A four byte string, identifying the member type, with the value "LZIP".
+A four byte string, identifying the lzip format, with the value "LZIP".
@item VN (version number, 1 byte)
Just in case something needs to be modified in the future. Valid values
@@ -385,9 +405,12 @@ safe recovery of undamaged members from multimember files.
@chapter A small tutorial with examples
@cindex examples
-WARNING! If your data is important, give the @samp{--keep} option to
-clzip and do not remove the original file until you verify the compressed
-file with a command like @samp{clzip -cd file.lz | cmp file -}.
+WARNING! Even if clzip is bug-free, other causes may result in a corrupt
+compressed file (bugs in the system libraries, memory errors, etc).
+Therefore, if the data you are going to compress is important give the
+@samp{--keep} option to clzip and do not remove the original file until
+you verify the compressed file with a command like @w{@samp{clzip -cd
+file.lz | cmp file -}}.
@sp 1
@noindent
@@ -401,7 +424,7 @@ clzip -v file
@sp 1
@noindent
Example 2: Like example 1 but the created file.lz is multimember with a
-member size of 1MiB.
+member size of 1MiB. The compression ratio is not shown.
@example
clzip -b 1MiB file
@@ -409,7 +432,25 @@ clzip -b 1MiB file
@sp 1
@noindent
-Example 3: Compress a whole floppy in /dev/fd0 and send the output to
+Example 3: Restore a regular file from its compressed version file.lz.
+If the operation is successful, file.lz is removed.
+
+@example
+clzip -d file.lz
+@end example
+
+@sp 1
+@noindent
+Example 4: Verify the integrity of the compressed file file.lz and show
+status.
+
+@example
+clzip -tv file.lz
+@end example
+
+@sp 1
+@noindent
+Example 5: Compress a whole floppy in /dev/fd0 and send the output to
file.lz.
@example
@@ -418,7 +459,16 @@ clzip -c /dev/fd0 > file.lz
@sp 1
@noindent
-Example 4: Create a multivolume compressed tar archive with a volume
+Example 6: Decompress file.lz partially until 10KiB of decompressed data
+are produced.
+
+@example
+clzip -cd file.lz | dd bs=1024 count=10
+@end example
+
+@sp 1
+@noindent
+Example 7: Create a multivolume compressed tar archive with a volume
size of 1440KiB.
@example
@@ -427,7 +477,7 @@ tar -c some_directory | clzip -S 1440KiB -o volume_name
@sp 1
@noindent
-Example 5: Extract a multivolume compressed tar archive.
+Example 8: Extract a multivolume compressed tar archive.
@example
clzip -cd volume_name*.lz | tar -xf -
@@ -435,7 +485,7 @@ clzip -cd volume_name*.lz | tar -xf -
@sp 1
@noindent
-Example 6: Create a multivolume compressed backup of a big database file
+Example 9: Create a multivolume compressed backup of a big database file
with a volume size of 650MB, where each volume is a multimember file
with a member size of 32MiB.