summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lzlib.info104
-rw-r--r--doc/lzlib.texinfo64
-rw-r--r--doc/minilzip.184
3 files changed, 174 insertions, 78 deletions
diff --git a/doc/lzlib.info b/doc/lzlib.info
index bfa5a82..511fda5 100644
--- a/doc/lzlib.info
+++ b/doc/lzlib.info
@@ -12,7 +12,7 @@ File: lzlib.info, Node: Top, Next: Introduction, Up: (dir)
Lzlib Manual
************
-This manual is for Lzlib (version 1.3, 29 February 2012).
+This manual is for Lzlib (version 1.4-rc2, 7 February 2013).
* Menu:
@@ -30,7 +30,7 @@ This manual is for Lzlib (version 1.3, 29 February 2012).
* Concept Index:: Index of concepts
- Copyright (C) 2009, 2010, 2011, 2012 Antonio Diaz Diaz.
+ Copyright (C) 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission to
copy, distribute and modify it.
@@ -113,7 +113,7 @@ minimum sizes:
* Input compression buffer. Written to by the `LZ_compress_write'
function. Its size is two times the dictionary size set with the
- `LZ_compress_open' function or 128KiB, whichever is larger.
+ `LZ_compress_open' function or 64KiB, whichever is larger.
* Output compression buffer. Read from by the `LZ_compress_read'
function. Its size is 64KiB.
@@ -161,12 +161,13 @@ File: lzlib.info, Node: Compression Functions, Next: Decompression Functions,
***********************
These are the functions used to compress data. In case of error, all of
-them return -1, except `LZ_compress_open' whose return value must be
-verified by calling `LZ_compress_errno' before using it.
+them return -1 or 0, for signed and unsigned return values respectively,
+except `LZ_compress_open' whose return value must be verified by
+calling `LZ_compress_errno' before using it.
-- Function: struct LZ_Encoder * LZ_compress_open ( const int
- DICTIONARY_SIZE, const int MATCH_LEN_LIMIT, const long long
- MEMBER_SIZE )
+ DICTIONARY_SIZE, const int MATCH_LEN_LIMIT, const unsigned
+ long long MEMBER_SIZE )
Initializes the internal stream state for compression and returns a
pointer that can only be used as the ENCODER argument for the
other LZ_compress functions, or a null pointer if the encoder
@@ -191,7 +192,7 @@ verified by calling `LZ_compress_errno' before using it.
size limit is 100kB. Small member size may degrade compression
ratio, so use it only when needed. To produce a single-member data
stream, give MEMBER_SIZE a value larger than the amount of data to
- be produced, for example LLONG_MAX.
+ be produced, for example INT64_MAX.
-- Function: int LZ_compress_close ( struct LZ_Encoder * const ENCODER
)
@@ -209,7 +210,7 @@ verified by calling `LZ_compress_errno' before using it.
new member can be started with `LZ_compress_restart_member'.
-- Function: int LZ_compress_restart_member ( struct LZ_Encoder *
- const ENCODER, const long long MEMBER_SIZE )
+ const ENCODER, const unsigned long long MEMBER_SIZE )
Use this function to start a new member, in a multi-member data
stream. Call this function only after
`LZ_compress_member_finished' indicates that the current member
@@ -245,10 +246,10 @@ verified by calling `LZ_compress_errno' before using it.
-- Function: int LZ_compress_write_size ( struct LZ_Encoder * const
ENCODER )
The `LZ_compress_write_size' function returns the maximum number of
- bytes that can be inmediately written through the
+ bytes that can be immediately written through the
`LZ_compress_write' function.
- It is guaranteed that an inmediate call to `LZ_compress_write' will
+ It is guaranteed that an immediate call to `LZ_compress_write' will
accept a SIZE up to the returned number of bytes.
-- Function: enum LZ_Errno LZ_compress_errno ( struct LZ_Encoder *
@@ -266,22 +267,22 @@ verified by calling `LZ_compress_errno' before using it.
has been fully read and `LZ_compress_restart_member' can be safely
called. Otherwise it returns 0.
- -- Function: long long LZ_compress_data_position ( struct LZ_Encoder *
- const ENCODER )
+ -- Function: unsigned long long LZ_compress_data_position ( struct
+ LZ_Encoder * const ENCODER )
Returns the number of input bytes already compressed in the current
member.
- -- Function: long long LZ_compress_member_position ( struct LZ_Encoder
- * const ENCODER )
+ -- Function: unsigned long long LZ_compress_member_position ( struct
+ LZ_Encoder * const ENCODER )
Returns the number of compressed bytes already produced, but
perhaps not yet read, in the current member.
- -- Function: long long LZ_compress_total_in_size ( struct LZ_Encoder *
- const ENCODER )
+ -- Function: unsigned long long LZ_compress_total_in_size ( struct
+ LZ_Encoder * const ENCODER )
Returns the total number of input bytes already compressed.
- -- Function: long long LZ_compress_total_out_size ( struct LZ_Encoder
- * const ENCODER )
+ -- Function: unsigned long long LZ_compress_total_out_size ( struct
+ LZ_Encoder * const ENCODER )
Returns the total number of compressed bytes already produced, but
perhaps not yet read.
@@ -292,8 +293,9 @@ File: lzlib.info, Node: Decompression Functions, Next: Error Codes, Prev: Com
*************************
These are the functions used to decompress data. In case of error, all
-of them return -1, except `LZ_decompress_open' whose return value must
-be verified by calling `LZ_decompress_errno' before using it.
+of them return -1 or 0, for signed and unsigned return values
+respectively, except `LZ_decompress_open' whose return value must be
+verified by calling `LZ_decompress_errno' before using it.
-- Function: struct LZ_Decoder * LZ_decompress_open ( void )
Initializes the internal stream state for decompression and
@@ -360,10 +362,10 @@ be verified by calling `LZ_decompress_errno' before using it.
-- Function: int LZ_decompress_write_size ( struct LZ_Decoder * const
DECODER )
The `LZ_decompress_write_size' function returns the maximum number
- of bytes that can be inmediately written through the
+ of bytes that can be immediately written through the
`LZ_decompress_write' function.
- It is guaranteed that an inmediate call to `LZ_decompress_write'
+ It is guaranteed that an immediate call to `LZ_decompress_write'
will accept a SIZE up to the returned number of bytes.
-- Function: enum LZ_Errno LZ_decompress_errno ( struct LZ_Decoder *
@@ -391,27 +393,27 @@ be verified by calling `LZ_decompress_errno' before using it.
const DECODER )
Returns the dictionary size of current member from member header.
- -- Function: unsigned int LZ_decompress_data_crc ( struct LZ_Decoder *
+ -- Function: unsigned LZ_decompress_data_crc ( struct LZ_Decoder *
const DECODER )
Returns the 32 bit Cyclic Redundancy Check of the data
decompressed from the current member. The returned value is valid
only when `LZ_decompress_member_finished' returns 1.
- -- Function: long long LZ_decompress_data_position ( struct LZ_Decoder
- * const DECODER )
+ -- Function: unsigned long long LZ_decompress_data_position ( struct
+ LZ_Decoder * const DECODER )
Returns the number of decompressed bytes already produced, but
perhaps not yet read, in the current member.
- -- Function: long long LZ_decompress_member_position ( struct
+ -- Function: unsigned long long LZ_decompress_member_position ( struct
LZ_Decoder * const DECODER )
Returns the number of input bytes already decompressed in the
current member.
- -- Function: long long LZ_decompress_total_in_size ( struct LZ_Decoder
- * const DECODER )
+ -- Function: unsigned long long LZ_decompress_total_in_size ( struct
+ LZ_Decoder * const DECODER )
Returns the total number of input bytes already decompressed.
- -- Function: long long LZ_decompress_total_out_size ( struct
+ -- Function: unsigned long long LZ_decompress_total_out_size ( struct
LZ_Decoder * const DECODER )
Returns the total number of decompressed bytes already produced,
but perhaps not yet read.
@@ -490,7 +492,12 @@ File: lzlib.info, Node: Data Format, Next: Examples, Prev: Error Messages, U
9 Data Format
*************
-In the diagram below, a box like this:
+Perfection is reached, not when there is no longer anything to add, but
+when there is no longer anything to take away.
+-- Antoine de Saint-Exupery
+
+
+ In the diagram below, a box like this:
+---+
| | <-- the vertical bars might be missing
+---+
@@ -519,9 +526,8 @@ with no additional information before, between, or after them.
"LZIP".
`VN (version number, 1 byte)'
- Just in case something needs to be modified in the future. Valid
- values are 0 and 1. Version 0 files are deprecated. They can
- contain only one member and lack the `Member size' field.
+ Just in case something needs to be modified in the future. 1 for
+ now.
`DS (coded dictionary size, 1 byte)'
Bits 4-0 contain the base 2 logarithm of the base dictionary size.
@@ -541,9 +547,9 @@ with no additional information before, between, or after them.
Size of the uncompressed original data.
`Member size (8 bytes)'
- Total size of the member, including header and trailer. This
- facilitates safe recovery of undamaged members from multi-member
- files.
+ Total size of the member, including header and trailer. This field
+ acts as a distributed index, and facilitates safe recovery of
+ undamaged members from multi-member files.

@@ -709,18 +715,18 @@ Concept Index

Tag Table:
Node: Top219
-Node: Introduction1318
-Node: Library Version3164
-Node: Buffering3809
-Node: Parameter Limits4929
-Node: Compression Functions5886
-Node: Decompression Functions11985
-Node: Error Codes18057
-Node: Error Messages19996
-Node: Data Format20575
-Node: Examples22584
-Node: Problems26667
-Node: Concept Index27239
+Node: Introduction1327
+Node: Library Version3173
+Node: Buffering3818
+Node: Parameter Limits4937
+Node: Compression Functions5894
+Node: Decompression Functions12104
+Node: Error Codes18265
+Node: Error Messages20204
+Node: Data Format20783
+Node: Examples22864
+Node: Problems26947
+Node: Concept Index27519

End Tag Table
diff --git a/doc/lzlib.texinfo b/doc/lzlib.texinfo
index 17b78f1..eeae174 100644
--- a/doc/lzlib.texinfo
+++ b/doc/lzlib.texinfo
@@ -6,8 +6,8 @@
@finalout
@c %**end of header
-@set UPDATED 29 February 2012
-@set VERSION 1.3
+@set UPDATED 7 February 2013
+@set VERSION 1.4-rc2
@dircategory Data Compression
@direntry
@@ -50,7 +50,7 @@ This manual is for Lzlib (version @value{VERSION}, @value{UPDATED}).
@end menu
@sp 1
-Copyright @copyright{} 2009, 2010, 2011, 2012 Antonio Diaz Diaz.
+Copyright @copyright{} 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz.
This manual is free documentation: you have unlimited permission
to copy, distribute and modify it.
@@ -134,7 +134,7 @@ sizes:
@itemize @bullet
@item Input compression buffer. Written to by the
@samp{LZ_compress_write} function. Its size is two times the dictionary
-size set with the @samp{LZ_compress_open} function or 128KiB, whichever
+size set with the @samp{LZ_compress_open} function or 64KiB, whichever
is larger.
@item Output compression buffer. Read from by the
@@ -187,11 +187,12 @@ Returns the largest valid match length limit [273].
@cindex compression functions
These are the functions used to compress data. In case of error, all of
-them return -1, except @samp{LZ_compress_open} whose return value must
-be verified by calling @samp{LZ_compress_errno} before using it.
+them return -1 or 0, for signed and unsigned return values respectively,
+except @samp{LZ_compress_open} whose return value must be verified by
+calling @samp{LZ_compress_errno} before using it.
-@deftypefun {struct LZ_Encoder *} LZ_compress_open ( const int @var{dictionary_size}, const int @var{match_len_limit}, const long long @var{member_size} )
+@deftypefun {struct LZ_Encoder *} LZ_compress_open ( const int @var{dictionary_size}, const int @var{match_len_limit}, const unsigned long long @var{member_size} )
Initializes the internal stream state for compression and returns a
pointer that can only be used as the @var{encoder} argument for the
other LZ_compress functions, or a null pointer if the encoder could not
@@ -216,7 +217,7 @@ ratios but longer compression times.
size limit is 100kB. Small member size may degrade compression ratio, so
use it only when needed. To produce a single-member data stream, give
@var{member_size} a value larger than the amount of data to be produced,
-for example LLONG_MAX.
+for example INT64_MAX.
@end deftypefun
@@ -237,7 +238,7 @@ After all the produced compressed data has been read with
@end deftypefun
-@deftypefun int LZ_compress_restart_member ( struct LZ_Encoder * const @var{encoder}, const long long @var{member_size} )
+@deftypefun int LZ_compress_restart_member ( struct LZ_Encoder * const @var{encoder}, const unsigned long long @var{member_size} )
Use this function to start a new member, in a multi-member data stream.
Call this function only after @samp{LZ_compress_member_finished}
indicates that the current member has been fully read (with the
@@ -278,10 +279,10 @@ not an error.
@deftypefun int LZ_compress_write_size ( struct LZ_Encoder * const @var{encoder} )
The @samp{LZ_compress_write_size} function returns the maximum number of
-bytes that can be inmediately written through the @samp{LZ_compress_write}
+bytes that can be immediately written through the @samp{LZ_compress_write}
function.
-It is guaranteed that an inmediate call to @samp{LZ_compress_write} will
+It is guaranteed that an immediate call to @samp{LZ_compress_write} will
accept a @var{size} up to the returned number of bytes.
@end deftypefun
@@ -304,24 +305,24 @@ Otherwise it returns 0.
@end deftypefun
-@deftypefun {long long} LZ_compress_data_position ( struct LZ_Encoder * const @var{encoder} )
+@deftypefun {unsigned long long} LZ_compress_data_position ( struct LZ_Encoder * const @var{encoder} )
Returns the number of input bytes already compressed in the current
member.
@end deftypefun
-@deftypefun {long long} LZ_compress_member_position ( struct LZ_Encoder * const @var{encoder} )
+@deftypefun {unsigned long long} LZ_compress_member_position ( struct LZ_Encoder * const @var{encoder} )
Returns the number of compressed bytes already produced, but perhaps not
yet read, in the current member.
@end deftypefun
-@deftypefun {long long} LZ_compress_total_in_size ( struct LZ_Encoder * const @var{encoder} )
+@deftypefun {unsigned long long} LZ_compress_total_in_size ( struct LZ_Encoder * const @var{encoder} )
Returns the total number of input bytes already compressed.
@end deftypefun
-@deftypefun {long long} LZ_compress_total_out_size ( struct LZ_Encoder * const @var{encoder} )
+@deftypefun {unsigned long long} LZ_compress_total_out_size ( struct LZ_Encoder * const @var{encoder} )
Returns the total number of compressed bytes already produced, but
perhaps not yet read.
@end deftypefun
@@ -332,8 +333,9 @@ perhaps not yet read.
@cindex decompression functions
These are the functions used to decompress data. In case of error, all
-of them return -1, except @samp{LZ_decompress_open} whose return value
-must be verified by calling @samp{LZ_decompress_errno} before using it.
+of them return -1 or 0, for signed and unsigned return values
+respectively, except @samp{LZ_decompress_open} whose return value must
+be verified by calling @samp{LZ_decompress_errno} before using it.
@deftypefun {struct LZ_Decoder *} LZ_decompress_open ( void )
@@ -410,10 +412,10 @@ not an error.
@deftypefun int LZ_decompress_write_size ( struct LZ_Decoder * const @var{decoder} )
The @samp{LZ_decompress_write_size} function returns the maximum number
-of bytes that can be inmediately written through the
+of bytes that can be immediately written through the
@samp{LZ_decompress_write} function.
-It is guaranteed that an inmediate call to @samp{LZ_decompress_write}
+It is guaranteed that an immediate call to @samp{LZ_decompress_write}
will accept a @var{size} up to the returned number of bytes.
@end deftypefun
@@ -448,31 +450,31 @@ Returns the dictionary size of current member from member header.
@end deftypefun
-@deftypefun {unsigned int} LZ_decompress_data_crc ( struct LZ_Decoder * const @var{decoder} )
+@deftypefun {unsigned} LZ_decompress_data_crc ( struct LZ_Decoder * const @var{decoder} )
Returns the 32 bit Cyclic Redundancy Check of the data decompressed from
the current member. The returned value is valid only when
@samp{LZ_decompress_member_finished} returns 1.
@end deftypefun
-@deftypefun {long long} LZ_decompress_data_position ( struct LZ_Decoder * const @var{decoder} )
+@deftypefun {unsigned long long} LZ_decompress_data_position ( struct LZ_Decoder * const @var{decoder} )
Returns the number of decompressed bytes already produced, but perhaps
not yet read, in the current member.
@end deftypefun
-@deftypefun {long long} LZ_decompress_member_position ( struct LZ_Decoder * const @var{decoder} )
+@deftypefun {unsigned long long} LZ_decompress_member_position ( struct LZ_Decoder * const @var{decoder} )
Returns the number of input bytes already decompressed in the current
member.
@end deftypefun
-@deftypefun {long long} LZ_decompress_total_in_size ( struct LZ_Decoder * const @var{decoder} )
+@deftypefun {unsigned long long} LZ_decompress_total_in_size ( struct LZ_Decoder * const @var{decoder} )
Returns the total number of input bytes already decompressed.
@end deftypefun
-@deftypefun {long long} LZ_decompress_total_out_size ( struct LZ_Decoder * const @var{decoder} )
+@deftypefun {unsigned long long} LZ_decompress_total_out_size ( struct LZ_Decoder * const @var{decoder} )
Returns the total number of decompressed bytes already produced, but
perhaps not yet read.
@end deftypefun
@@ -555,6 +557,11 @@ The value of @var{lz_errno} normally comes from a call to
@chapter Data Format
@cindex data format
+Perfection is reached, not when there is no longer anything to add, but
+when there is no longer anything to take away.@*
+--- Antoine de Saint-Exupery
+
+@sp 1
In the diagram below, a box like this:
@verbatim
+---+
@@ -590,9 +597,7 @@ All multibyte values are stored in little endian order.
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
-are 0 and 1. Version 0 files are deprecated. They can contain only one
-member and lack the @samp{Member size} field.
+Just in case something needs to be modified in the future. 1 for now.
@item DS (coded dictionary size, 1 byte)
Bits 4-0 contain the base 2 logarithm of the base dictionary size.@*
@@ -612,8 +617,9 @@ CRC of the uncompressed original data.
Size of the uncompressed original data.
@item Member size (8 bytes)
-Total size of the member, including header and trailer. This facilitates
-safe recovery of undamaged members from multi-member files.
+Total size of the member, including header and trailer. This field acts
+as a distributed index, and facilitates safe recovery of undamaged
+members from multi-member files.
@end table
diff --git a/doc/minilzip.1 b/doc/minilzip.1
new file mode 100644
index 0000000..a7f6d21
--- /dev/null
+++ b/doc/minilzip.1
@@ -0,0 +1,84 @@
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1.
+.TH MINILZIP "1" "February 2013" "Minilzip 1.4-rc2" "User Commands"
+.SH NAME
+Minilzip \- reduces the size of files
+.SH SYNOPSIS
+.B minilzip
+[\fIoptions\fR] [\fIfiles\fR]
+.SH DESCRIPTION
+Minilzip \- A test program for the lzlib library.
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+display this help and exit
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+output version information and exit
+.TP
+\fB\-b\fR, \fB\-\-member\-size=\fR<bytes>
+set member size limit in bytes
+.TP
+\fB\-c\fR, \fB\-\-stdout\fR
+send output to standard output
+.TP
+\fB\-d\fR, \fB\-\-decompress\fR
+decompress
+.TP
+\fB\-f\fR, \fB\-\-force\fR
+overwrite existing output files
+.TP
+\fB\-F\fR, \fB\-\-recompress\fR
+force recompression of compressed files
+.TP
+\fB\-k\fR, \fB\-\-keep\fR
+keep (don't delete) input files
+.TP
+\fB\-m\fR, \fB\-\-match\-length=\fR<bytes>
+set match length limit in bytes [36]
+.TP
+\fB\-o\fR, \fB\-\-output=\fR<file>
+if reading stdin, place the output into <file>
+.TP
+\fB\-q\fR, \fB\-\-quiet\fR
+suppress all messages
+.TP
+\fB\-s\fR, \fB\-\-dictionary\-size=\fR<bytes>
+set dictionary size limit in bytes [8MiB]
+.TP
+\fB\-S\fR, \fB\-\-volume\-size=\fR<bytes>
+set volume size limit in bytes
+.TP
+\fB\-t\fR, \fB\-\-test\fR
+test compressed file integrity
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+be verbose (a 2nd \fB\-v\fR gives more)
+.TP
+\fB\-1\fR .. \fB\-9\fR
+set compression level [default 6]
+.TP
+\fB\-\-fast\fR
+alias for \fB\-1\fR
+.TP
+\fB\-\-best\fR
+alias for \fB\-9\fR
+.PP
+If no file names are given, minilzip compresses or decompresses
+from standard input to standard output.
+Numbers may be followed by a multiplier: k = kB = 10^3 = 1000,
+Ki = KiB = 2^10 = 1024, M = 10^6, Mi = 2^20, G = 10^9, Gi = 2^30, etc...
+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 \fB\-\-match\-length\fR and \fB\-\-dictionary\-size\fR
+options directly to achieve optimal performance.
+.SH "REPORTING BUGS"
+Report bugs to lzip\-bug@nongnu.org
+.br
+Lzlib home page: http://www.nongnu.org/lzip/lzlib.html
+.SH COPYRIGHT
+Copyright \(co 2013 Antonio Diaz Diaz.
+Using Lzlib 1.4\-rc2
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+.br
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.