Adding upstream version 1.11.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
1b337df7d0
commit
34f7af7bd1
27 changed files with 614 additions and 442 deletions
162
doc/lzlib.info
162
doc/lzlib.info
|
@ -11,7 +11,7 @@ File: lzlib.info, Node: Top, Next: Introduction, Up: (dir)
|
|||
Lzlib Manual
|
||||
************
|
||||
|
||||
This manual is for Lzlib (version 1.10, 7 February 2018).
|
||||
This manual is for Lzlib (version 1.11, 2 January 2019).
|
||||
|
||||
* Menu:
|
||||
|
||||
|
@ -30,7 +30,7 @@ This manual is for Lzlib (version 1.10, 7 February 2018).
|
|||
* Concept index:: Index of concepts
|
||||
|
||||
|
||||
Copyright (C) 2009-2018 Antonio Diaz Diaz.
|
||||
Copyright (C) 2009-2019 Antonio Diaz Diaz.
|
||||
|
||||
This manual is free documentation: you have unlimited permission to
|
||||
copy, distribute and modify it.
|
||||
|
@ -41,10 +41,10 @@ File: lzlib.info, Node: Introduction, Next: Library version, Prev: Top, Up:
|
|||
1 Introduction
|
||||
**************
|
||||
|
||||
Lzlib is a data compression library providing in-memory LZMA compression
|
||||
and decompression functions, including integrity checking of the
|
||||
decompressed data. The compressed data format used by the library is the
|
||||
lzip format. Lzlib is written in C.
|
||||
Lzlib is a data compression library providing in-memory LZMA
|
||||
compression and decompression functions, including integrity checking
|
||||
of the decompressed data. The compressed data format used by the
|
||||
library is the lzip format. Lzlib is written in C.
|
||||
|
||||
The lzip file format is designed for data sharing and long-term
|
||||
archiving, taking into account both data integrity and decoder
|
||||
|
@ -90,15 +90,20 @@ with a SIZE equal to 0.
|
|||
|
||||
If all the data to be compressed are written in advance, lzlib will
|
||||
automatically adjust the header of the compressed data to use the
|
||||
smallest possible dictionary size. This feature reduces the amount of
|
||||
memory needed for decompression and allows minilzip to produce identical
|
||||
compressed output as lzip.
|
||||
largest dictionary size that does not exceed neither the data size nor
|
||||
the limit given to 'LZ_compress_open'. This feature reduces the amount
|
||||
of memory needed for decompression and allows minilzip to produce
|
||||
identical compressed output as lzip.
|
||||
|
||||
Lzlib will correctly decompress a data stream which is the
|
||||
concatenation of two or more compressed data streams. The result is the
|
||||
concatenation of the corresponding decompressed data streams. Integrity
|
||||
testing of concatenated compressed data streams is also supported.
|
||||
|
||||
Lzlib is able to compress and decompress streams of unlimited size by
|
||||
automatically creating multimember output. The members so created are
|
||||
large, about 2 PiB each.
|
||||
|
||||
All the library functions are thread safe. The library does not
|
||||
install any signal handler. The decoder checks the consistency of the
|
||||
compressed data, so the library should never crash even in case of
|
||||
|
@ -253,11 +258,13 @@ calling 'LZ_compress_errno' before using it.
|
|||
output as 'lzip -0'. (The dictionary size used will be rounded
|
||||
upwards to 64 KiB).
|
||||
|
||||
MEMBER_SIZE sets the member size limit in bytes. Minimum member
|
||||
size limit is 100 kB. 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 INT64_MAX.
|
||||
MEMBER_SIZE sets the member size limit in bytes. Valid values
|
||||
range from 100 kB to 2 PiB. 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. Values larger than 2 PiB will be
|
||||
reduced to 2 PiB to prevent the uncompressed size of the member
|
||||
from overflowing.
|
||||
|
||||
-- Function: int LZ_compress_close ( struct LZ_Encoder * const ENCODER
|
||||
)
|
||||
|
@ -270,6 +277,7 @@ calling 'LZ_compress_errno' before using it.
|
|||
ENCODER )
|
||||
Use this function to tell 'lzlib' that all the data for this member
|
||||
have already been written (with the 'LZ_compress_write' function).
|
||||
It is safe to call 'LZ_compress_finish' as many times as needed.
|
||||
After all the produced compressed data have been read with
|
||||
'LZ_compress_read' and 'LZ_compress_member_finished' returns 1, a
|
||||
new member can be started with 'LZ_compress_restart_member'.
|
||||
|
@ -322,7 +330,7 @@ calling 'LZ_compress_errno' before using it.
|
|||
|
||||
-- Function: enum LZ_Errno LZ_compress_errno ( struct LZ_Encoder *
|
||||
const ENCODER )
|
||||
Returns the current error code for ENCODER (*note Error codes::).
|
||||
Returns the current error code for ENCODER. *Note Error codes::.
|
||||
|
||||
-- Function: int LZ_compress_finished ( struct LZ_Encoder * const
|
||||
ENCODER )
|
||||
|
@ -388,7 +396,8 @@ verified by calling 'LZ_decompress_errno' before using it.
|
|||
DECODER )
|
||||
Use this function to tell 'lzlib' that all the data for this stream
|
||||
have already been written (with the 'LZ_decompress_write'
|
||||
function).
|
||||
function). It is safe to call 'LZ_decompress_finish' as many
|
||||
times as needed.
|
||||
|
||||
-- Function: int LZ_decompress_reset ( struct LZ_Decoder * const
|
||||
DECODER )
|
||||
|
@ -420,6 +429,12 @@ verified by calling 'LZ_decompress_errno' before using it.
|
|||
'LZ_decompress_write' function. Note that reading less than SIZE
|
||||
bytes is not an error.
|
||||
|
||||
In case of decompression error caused by corrupt or truncated data,
|
||||
'LZ_decompress_read' does not signal the error immediately to the
|
||||
application, but waits until all decoded bytes have been read. This
|
||||
allows tools like tarlz to recover as much data as possible from
|
||||
each damaged member. *Note tarlz manual: (tarlz)Top.
|
||||
|
||||
-- Function: int LZ_decompress_write ( struct LZ_Decoder * const
|
||||
DECODER, uint8_t * const BUFFER, const int SIZE )
|
||||
The 'LZ_decompress_write' function writes up to SIZE bytes from
|
||||
|
@ -440,7 +455,7 @@ verified by calling 'LZ_decompress_errno' before using it.
|
|||
|
||||
-- Function: enum LZ_Errno LZ_decompress_errno ( struct LZ_Decoder *
|
||||
const DECODER )
|
||||
Returns the current error code for DECODER (*note Error codes::).
|
||||
Returns the current error code for DECODER. *Note Error codes::.
|
||||
|
||||
-- Function: int LZ_decompress_finished ( struct LZ_Decoder * const
|
||||
DECODER )
|
||||
|
@ -543,8 +558,8 @@ whether a call failed. If the call failed, then you can examine
|
|||
file.
|
||||
|
||||
-- Constant: enum LZ_Errno LZ_library_error
|
||||
A bug was detected in the library. Please, report it (*note
|
||||
Problems::).
|
||||
A bug was detected in the library. Please, report it. *Note
|
||||
Problems::.
|
||||
|
||||
|
||||
File: lzlib.info, Node: Error messages, Next: Invoking minilzip, Prev: Error codes, Up: Top
|
||||
|
@ -568,6 +583,9 @@ File: lzlib.info, Node: Invoking minilzip, Next: Data format, Prev: Error mes
|
|||
9 Invoking minilzip
|
||||
*******************
|
||||
|
||||
Minilzip is a test program for the lzlib compression library, fully
|
||||
compatible with lzip 1.4 or newer.
|
||||
|
||||
The format for running minilzip is:
|
||||
|
||||
minilzip [OPTIONS] [FILES]
|
||||
|
@ -585,7 +603,7 @@ command line.
|
|||
'-V'
|
||||
'--version'
|
||||
Print the version number of minilzip on the standard output and
|
||||
exit.
|
||||
exit. This version number should be included in all bug reports.
|
||||
|
||||
'-a'
|
||||
'--trailing-error'
|
||||
|
@ -654,12 +672,14 @@ command line.
|
|||
'-s BYTES'
|
||||
'--dictionary-size=BYTES'
|
||||
When compressing, set the dictionary size limit in bytes. Minilzip
|
||||
will use the smallest possible dictionary size for each file
|
||||
without exceeding this limit. Valid values range from 4 KiB to
|
||||
512 MiB. Values 12 to 29 are interpreted as powers of two, meaning
|
||||
2^12 to 2^29 bytes. Note that dictionary sizes are quantized. If
|
||||
the specified size does not match one of the valid sizes, it will
|
||||
be rounded upwards by adding up to (BYTES / 8) to it.
|
||||
will use for each file the largest dictionary size that does not
|
||||
exceed neither the file size nor this limit. Valid values range
|
||||
from 4 KiB to 512 MiB. Values 12 to 29 are interpreted as powers
|
||||
of two, meaning 2^12 to 2^29 bytes. Dictionary sizes are quantized
|
||||
so that they can be coded in just one byte (*note
|
||||
coded-dict-size::). If the specified size does not match one of
|
||||
the valid sizes, it will be rounded upwards by adding up to
|
||||
(BYTES / 8) to it.
|
||||
|
||||
For maximum compression you should use a dictionary size limit as
|
||||
large as possible, but keep in mind that the decompression memory
|
||||
|
@ -695,27 +715,32 @@ command line.
|
|||
size, and trailer contents (CRC, data size, member size).
|
||||
|
||||
'-0 .. -9'
|
||||
Set the compression parameters (dictionary size and match length
|
||||
limit) as shown in the table below. The default compression level
|
||||
is '-6'. Note that '-9' can be much slower than '-0'. These
|
||||
options have no effect when decompressing or testing.
|
||||
Compression level. Set the compression parameters (dictionary size
|
||||
and match length limit) as shown in the table below. The default
|
||||
compression level is '-6', equivalent to '-s8MiB -m36'. Note that
|
||||
'-9' can be much slower than '-0'. These options have no effect
|
||||
when decompressing or testing.
|
||||
|
||||
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 '--dictionary-size' and
|
||||
'--match-length' options directly to achieve optimal performance.
|
||||
|
||||
Level Dictionary size Match length limit
|
||||
-0 64 KiB 16 bytes
|
||||
-1 1 MiB 5 bytes
|
||||
-2 1.5 MiB 6 bytes
|
||||
-3 2 MiB 8 bytes
|
||||
-4 3 MiB 12 bytes
|
||||
-5 4 MiB 20 bytes
|
||||
-6 8 MiB 36 bytes
|
||||
-7 16 MiB 68 bytes
|
||||
-8 24 MiB 132 bytes
|
||||
-9 32 MiB 273 bytes
|
||||
If several compression levels or '-s' or '-m' options are given,
|
||||
the last setting is used. For example '-9 -s64MiB' is equivalent
|
||||
to '-s64MiB -m273'
|
||||
|
||||
Level Dictionary size (-s) Match length limit (-m)
|
||||
-0 64 KiB 16 bytes
|
||||
-1 1 MiB 5 bytes
|
||||
-2 1.5 MiB 6 bytes
|
||||
-3 2 MiB 8 bytes
|
||||
-4 3 MiB 12 bytes
|
||||
-5 4 MiB 20 bytes
|
||||
-6 8 MiB 36 bytes
|
||||
-7 16 MiB 68 bytes
|
||||
-8 24 MiB 132 bytes
|
||||
-9 32 MiB 273 bytes
|
||||
|
||||
'--fast'
|
||||
'--best'
|
||||
|
@ -795,11 +820,11 @@ stream, with no additional information before, between, or after them.
|
|||
|
||||
'DS (coded dictionary size, 1 byte)'
|
||||
The dictionary size is calculated by taking a power of 2 (the base
|
||||
size) and substracting from it a fraction between 0/16 and 7/16 of
|
||||
size) and subtracting from it a fraction between 0/16 and 7/16 of
|
||||
the base size.
|
||||
Bits 4-0 contain the base 2 logarithm of the base size (12 to 29).
|
||||
Bits 7-5 contain the numerator of the fraction (0 to 7) to
|
||||
substract from the base size to obtain the dictionary size.
|
||||
Bits 7-5 contain the numerator of the fraction (0 to 7) to subtract
|
||||
from the base size to obtain the dictionary size.
|
||||
Example: 0xD3 = 2^19 - 6 * 2^15 = 512 KiB - 6 * 32 KiB = 320 KiB
|
||||
Valid values for dictionary size range from 4 KiB to 512 MiB.
|
||||
|
||||
|
@ -845,12 +870,10 @@ Example 1: Normal compression (MEMBER_SIZE > total output).
|
|||
|
||||
1) LZ_compress_open
|
||||
2) LZ_compress_write
|
||||
3) LZ_compress_read
|
||||
4) go back to step 2 until all input data have been written
|
||||
5) LZ_compress_finish
|
||||
6) LZ_compress_read
|
||||
7) go back to step 6 until LZ_compress_finished returns 1
|
||||
8) LZ_compress_close
|
||||
3) if no more data to write, call LZ_compress_finish
|
||||
4) LZ_compress_read
|
||||
5) go back to step 2 until LZ_compress_finished returns 1
|
||||
6) LZ_compress_close
|
||||
|
||||
|
||||
Example 2: Normal compression using LZ_compress_write_size.
|
||||
|
@ -868,12 +891,10 @@ Example 3: Decompression.
|
|||
|
||||
1) LZ_decompress_open
|
||||
2) LZ_decompress_write
|
||||
3) LZ_decompress_read
|
||||
4) go back to step 2 until all input data have been written
|
||||
5) LZ_decompress_finish
|
||||
6) LZ_decompress_read
|
||||
7) go back to step 6 until LZ_decompress_finished returns 1
|
||||
8) LZ_decompress_close
|
||||
3) if no more data to write, call LZ_decompress_finish
|
||||
4) LZ_decompress_read
|
||||
5) go back to step 2 until LZ_decompress_finished returns 1
|
||||
6) LZ_decompress_close
|
||||
|
||||
|
||||
Example 4: Decompression using LZ_decompress_write_size.
|
||||
|
@ -988,20 +1009,21 @@ Concept index
|
|||
|
||||
Tag Table:
|
||||
Node: Top220
|
||||
Node: Introduction1342
|
||||
Node: Library version6154
|
||||
Node: Buffering6799
|
||||
Node: Parameter limits8024
|
||||
Node: Compression functions8983
|
||||
Node: Decompression functions15592
|
||||
Node: Error codes21762
|
||||
Node: Error messages24064
|
||||
Node: Invoking minilzip24649
|
||||
Ref: --trailing-error25243
|
||||
Node: Data format31883
|
||||
Node: Examples34454
|
||||
Node: Problems38570
|
||||
Node: Concept index39142
|
||||
Node: Introduction1341
|
||||
Node: Library version6397
|
||||
Node: Buffering7042
|
||||
Node: Parameter limits8267
|
||||
Node: Compression functions9226
|
||||
Node: Decompression functions16010
|
||||
Node: Error codes22599
|
||||
Node: Error messages24900
|
||||
Node: Invoking minilzip25485
|
||||
Ref: --trailing-error26243
|
||||
Node: Data format33248
|
||||
Ref: coded-dict-size34557
|
||||
Node: Examples35817
|
||||
Node: Problems39813
|
||||
Node: Concept index40385
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
|
120
doc/lzlib.texi
120
doc/lzlib.texi
|
@ -6,8 +6,8 @@
|
|||
@finalout
|
||||
@c %**end of header
|
||||
|
||||
@set UPDATED 7 February 2018
|
||||
@set VERSION 1.10
|
||||
@set UPDATED 2 January 2019
|
||||
@set VERSION 1.11
|
||||
|
||||
@dircategory Data Compression
|
||||
@direntry
|
||||
|
@ -51,7 +51,7 @@ This manual is for Lzlib (version @value{VERSION}, @value{UPDATED}).
|
|||
@end menu
|
||||
|
||||
@sp 1
|
||||
Copyright @copyright{} 2009-2018 Antonio Diaz Diaz.
|
||||
Copyright @copyright{} 2009-2019 Antonio Diaz Diaz.
|
||||
|
||||
This manual is free documentation: you have unlimited permission
|
||||
to copy, distribute and modify it.
|
||||
|
@ -61,14 +61,13 @@ to copy, distribute and modify it.
|
|||
@chapter Introduction
|
||||
@cindex introduction
|
||||
|
||||
Lzlib is a data compression library providing in-memory LZMA compression
|
||||
and decompression functions, including integrity checking of the
|
||||
decompressed data. The compressed data format used by the library is the
|
||||
lzip format. Lzlib is written in C.
|
||||
@uref{http://www.nongnu.org/lzip/lzlib.html,,Lzlib} is a data compression
|
||||
library providing in-memory LZMA compression and decompression functions,
|
||||
including integrity checking of the decompressed data. The compressed data
|
||||
format used by the library is the lzip format. Lzlib is written in C.
|
||||
|
||||
The lzip file format is designed for data sharing and long-term
|
||||
archiving, taking into account both data integrity and decoder
|
||||
availability:
|
||||
The lzip file format is designed for data sharing and long-term archiving,
|
||||
taking into account both data integrity and decoder availability:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
|
@ -118,15 +117,20 @@ data to be compressed in advance, just call the read function with a
|
|||
|
||||
If all the data to be compressed are written in advance, lzlib will
|
||||
automatically adjust the header of the compressed data to use the
|
||||
smallest possible dictionary size. This feature reduces the amount of
|
||||
memory needed for decompression and allows minilzip to produce identical
|
||||
compressed output as lzip.
|
||||
largest dictionary size that does not exceed neither the data size nor
|
||||
the limit given to @samp{LZ_compress_open}. This feature reduces the
|
||||
amount of memory needed for decompression and allows minilzip to produce
|
||||
identical compressed output as lzip.
|
||||
|
||||
Lzlib will correctly decompress a data stream which is the concatenation
|
||||
of two or more compressed data streams. The result is the concatenation
|
||||
of the corresponding decompressed data streams. Integrity testing of
|
||||
concatenated compressed data streams is also supported.
|
||||
|
||||
Lzlib is able to compress and decompress streams of unlimited size by
|
||||
automatically creating multimember output. The members so created are
|
||||
large, about @w{2 PiB} each.
|
||||
|
||||
All the library functions are thread safe. The library does not install
|
||||
any signal handler. The decoder checks the consistency of the compressed
|
||||
data, so the library should never crash even in case of corrupted input.
|
||||
|
@ -286,11 +290,13 @@ fast variant of LZMA is chosen, which produces identical compressed
|
|||
output as @code{lzip -0}. (The dictionary size used will be rounded
|
||||
upwards to @w{64 KiB}).
|
||||
|
||||
@var{member_size} sets the member size limit in bytes. Minimum member
|
||||
size limit is @w{100 kB}. 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 INT64_MAX.
|
||||
@var{member_size} sets the member size limit in bytes. Valid values
|
||||
range from @w{100 kB} to @w{2 PiB}. 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. Values larger than @w{2 PiB} will be
|
||||
reduced to @w{2 PiB} to prevent the uncompressed size of the member from
|
||||
overflowing.
|
||||
@end deftypefun
|
||||
|
||||
|
||||
|
@ -305,6 +311,7 @@ longer be used as an argument to any LZ_compress function.
|
|||
@deftypefun int LZ_compress_finish ( struct LZ_Encoder * const @var{encoder} )
|
||||
Use this function to tell @samp{lzlib} that all the data for this member
|
||||
have already been written (with the @samp{LZ_compress_write} function).
|
||||
It is safe to call @samp{LZ_compress_finish} as many times as needed.
|
||||
After all the produced compressed data have been read with
|
||||
@samp{LZ_compress_read} and @samp{LZ_compress_member_finished} returns
|
||||
1, a new member can be started with @samp{LZ_compress_restart_member}.
|
||||
|
@ -364,7 +371,7 @@ accept a @var{size} up to the returned number of bytes.
|
|||
|
||||
|
||||
@deftypefun {enum LZ_Errno} LZ_compress_errno ( struct LZ_Encoder * const @var{encoder} )
|
||||
Returns the current error code for @var{encoder} (@pxref{Error codes}).
|
||||
Returns the current error code for @var{encoder}. @xref{Error codes}.
|
||||
@end deftypefun
|
||||
|
||||
|
||||
|
@ -440,6 +447,7 @@ longer be used as an argument to any LZ_decompress function.
|
|||
@deftypefun int LZ_decompress_finish ( struct LZ_Decoder * const @var{decoder} )
|
||||
Use this function to tell @samp{lzlib} that all the data for this stream
|
||||
have already been written (with the @samp{LZ_decompress_write} function).
|
||||
It is safe to call @samp{LZ_decompress_finish} as many times as needed.
|
||||
@end deftypefun
|
||||
|
||||
|
||||
|
@ -474,6 +482,16 @@ less than @var{size}; for example, if there aren't that many bytes left
|
|||
in the stream or if more bytes have to be yet written with the
|
||||
@samp{LZ_decompress_write} function. Note that reading less than
|
||||
@var{size} bytes is not an error.
|
||||
|
||||
In case of decompression error caused by corrupt or truncated data,
|
||||
@samp{LZ_decompress_read} does not signal the error immediately to the
|
||||
application, but waits until all decoded bytes have been read. This
|
||||
allows tools like
|
||||
@uref{http://www.nongnu.org/lzip/manual/tarlz_manual.html,,tarlz} to
|
||||
recover as much data as possible from each damaged member.
|
||||
@ifnothtml
|
||||
@xref{Top,tarlz manual,,tarlz}.
|
||||
@end ifnothtml
|
||||
@end deftypefun
|
||||
|
||||
|
||||
|
@ -498,7 +516,7 @@ will accept a @var{size} up to the returned number of bytes.
|
|||
|
||||
|
||||
@deftypefun {enum LZ_Errno} LZ_decompress_errno ( struct LZ_Decoder * const @var{decoder} )
|
||||
Returns the current error code for @var{decoder} (@pxref{Error codes}).
|
||||
Returns the current error code for @var{decoder}. @xref{Error codes}.
|
||||
@end deftypefun
|
||||
|
||||
|
||||
|
@ -616,7 +634,7 @@ used to remove conflicting trailing data from a file.
|
|||
@end deftypevr
|
||||
|
||||
@deftypevr Constant {enum LZ_Errno} LZ_library_error
|
||||
A bug was detected in the library. Please, report it (@pxref{Problems}).
|
||||
A bug was detected in the library. Please, report it. @xref{Problems}.
|
||||
@end deftypevr
|
||||
|
||||
|
||||
|
@ -640,6 +658,10 @@ The value of @var{lz_errno} normally comes from a call to
|
|||
@cindex invoking
|
||||
@cindex options
|
||||
|
||||
Minilzip is a test program for the lzlib compression library, fully
|
||||
compatible with lzip 1.4 or newer.
|
||||
|
||||
@noindent
|
||||
The format for running minilzip is:
|
||||
|
||||
@example
|
||||
|
@ -661,6 +683,7 @@ Print an informative help message describing the options and exit.
|
|||
@item -V
|
||||
@itemx --version
|
||||
Print the version number of minilzip on the standard output and exit.
|
||||
This version number should be included in all bug reports.
|
||||
|
||||
@anchor{--trailing-error}
|
||||
@item -a
|
||||
|
@ -728,12 +751,13 @@ Quiet operation. Suppress all messages.
|
|||
@item -s @var{bytes}
|
||||
@itemx --dictionary-size=@var{bytes}
|
||||
When compressing, set the dictionary size limit in bytes. Minilzip will use
|
||||
the smallest possible dictionary size for each file without exceeding
|
||||
this limit. Valid values range from @w{4 KiB} to @w{512 MiB}. Values 12
|
||||
to 29 are interpreted as powers of two, meaning 2^12 to 2^29 bytes. Note
|
||||
that dictionary sizes are quantized. If the specified size does not
|
||||
match one of the valid sizes, it will be rounded upwards by adding up to
|
||||
@w{(@var{bytes} / 8)} to it.
|
||||
for each file the largest dictionary size that does not exceed neither
|
||||
the file size nor this limit. Valid values range from @w{4 KiB} to
|
||||
@w{512 MiB}. Values 12 to 29 are interpreted as powers of two, meaning
|
||||
2^12 to 2^29 bytes. Dictionary sizes are quantized so that they can be
|
||||
coded in just one byte (@pxref{coded-dict-size}). If the specified size
|
||||
does not match one of the valid sizes, it will be rounded upwards by
|
||||
adding up to @w{(@var{bytes} / 8)} to it.
|
||||
|
||||
For maximum compression you should use a dictionary size limit as large
|
||||
as possible, but keep in mind that the decompression memory requirement
|
||||
|
@ -768,18 +792,23 @@ verbosity level, showing status, compression ratio, dictionary size,
|
|||
and trailer contents (CRC, data size, member size).
|
||||
|
||||
@item -0 .. -9
|
||||
Set the compression parameters (dictionary size and match length limit)
|
||||
as shown in the table below. The default compression level is @samp{-6}.
|
||||
Note that @samp{-9} can be much slower than @samp{-0}. These options
|
||||
have no effect when decompressing or testing.
|
||||
Compression level. Set the compression parameters (dictionary size and
|
||||
match length limit) as shown in the table below. The default compression
|
||||
level is @samp{-6}, equivalent to @w{@samp{-s8MiB -m36}}. Note that
|
||||
@samp{-9} can be much slower than @samp{-0}. These options have no
|
||||
effect when decompressing or testing.
|
||||
|
||||
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{--dictionary-size} and
|
||||
@samp{--match-length} options directly to achieve optimal performance.
|
||||
|
||||
@multitable {Level} {Dictionary size} {Match length limit}
|
||||
@item Level @tab Dictionary size @tab Match length limit
|
||||
If several compression levels or @samp{-s} or @samp{-m} options are
|
||||
given, the last setting is used. For example @w{@samp{-9 -s64MiB}} is
|
||||
equivalent to @w{@samp{-s64MiB -m273}}
|
||||
|
||||
@multitable {Level} {Dictionary size (-s)} {Match length limit (-m)}
|
||||
@item Level @tab Dictionary size (-s) @tab Match length limit (-m)
|
||||
@item -0 @tab 64 KiB @tab 16 bytes
|
||||
@item -1 @tab 1 MiB @tab 5 bytes
|
||||
@item -2 @tab 1.5 MiB @tab 6 bytes
|
||||
|
@ -875,12 +904,13 @@ 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. 1 for now.
|
||||
|
||||
@anchor{coded-dict-size}
|
||||
@item DS (coded dictionary size, 1 byte)
|
||||
The dictionary size is calculated by taking a power of 2 (the base size)
|
||||
and substracting from it a fraction between 0/16 and 7/16 of the base
|
||||
and subtracting from it a fraction between 0/16 and 7/16 of the base
|
||||
size.@*
|
||||
Bits 4-0 contain the base 2 logarithm of the base size (12 to 29).@*
|
||||
Bits 7-5 contain the numerator of the fraction (0 to 7) to substract
|
||||
Bits 7-5 contain the numerator of the fraction (0 to 7) to subtract
|
||||
from the base size to obtain the dictionary size.@*
|
||||
Example: 0xD3 = 2^19 - 6 * 2^15 = 512 KiB - 6 * 32 KiB = 320 KiB@*
|
||||
Valid values for dictionary size range from 4 KiB to 512 MiB.
|
||||
|
@ -934,12 +964,10 @@ Example 1: Normal compression (@var{member_size} > total output).
|
|||
@example
|
||||
1) LZ_compress_open
|
||||
2) LZ_compress_write
|
||||
3) LZ_compress_read
|
||||
4) go back to step 2 until all input data have been written
|
||||
5) LZ_compress_finish
|
||||
6) LZ_compress_read
|
||||
7) go back to step 6 until LZ_compress_finished returns 1
|
||||
8) LZ_compress_close
|
||||
3) if no more data to write, call LZ_compress_finish
|
||||
4) LZ_compress_read
|
||||
5) go back to step 2 until LZ_compress_finished returns 1
|
||||
6) LZ_compress_close
|
||||
@end example
|
||||
|
||||
@sp 1
|
||||
|
@ -963,12 +991,10 @@ Example 3: Decompression.
|
|||
@example
|
||||
1) LZ_decompress_open
|
||||
2) LZ_decompress_write
|
||||
3) LZ_decompress_read
|
||||
4) go back to step 2 until all input data have been written
|
||||
5) LZ_decompress_finish
|
||||
6) LZ_decompress_read
|
||||
7) go back to step 6 until LZ_decompress_finished returns 1
|
||||
8) LZ_decompress_close
|
||||
3) if no more data to write, call LZ_decompress_finish
|
||||
4) LZ_decompress_read
|
||||
5) go back to step 2 until LZ_decompress_finished returns 1
|
||||
6) LZ_decompress_close
|
||||
@end example
|
||||
|
||||
@sp 1
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.1.
|
||||
.TH MINILZIP "1" "February 2018" "minilzip 1.10" "User Commands"
|
||||
.TH MINILZIP "1" "January 2019" "minilzip 1.11" "User Commands"
|
||||
.SH NAME
|
||||
minilzip \- reduces the size of files
|
||||
.SH SYNOPSIS
|
||||
.B minilzip
|
||||
[\fI\,options\/\fR] [\fI\,files\/\fR]
|
||||
.SH DESCRIPTION
|
||||
Minilzip \- Test program for the lzlib library.
|
||||
Minilzip is a test program for the lzlib compression library, fully
|
||||
compatible with lzip 1.4 or newer.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
|
@ -49,7 +50,7 @@ suppress all messages
|
|||
set dictionary size limit in bytes [8 MiB]
|
||||
.TP
|
||||
\fB\-S\fR, \fB\-\-volume\-size=\fR<bytes>
|
||||
set volume size limit in bytes, implies \fB\-k\fR
|
||||
set volume size limit in bytes
|
||||
.TP
|
||||
\fB\-t\fR, \fB\-\-test\fR
|
||||
test compressed file integrity
|
||||
|
@ -90,8 +91,8 @@ Report bugs to lzip\-bug@nongnu.org
|
|||
.br
|
||||
Lzlib home page: http://www.nongnu.org/lzip/lzlib.html
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2018 Antonio Diaz Diaz.
|
||||
Using lzlib 1.10
|
||||
Copyright \(co 2019 Antonio Diaz Diaz.
|
||||
Using lzlib 1.11
|
||||
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
|
||||
.br
|
||||
This is free software: you are free to change and redistribute it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue