|
Options |
Name |
Purpose |
|
|
|
BuildTable (integer[], integer, memptr, integer)
|
Builds the lookup table of a canonical Huffman code
Notes : The table has 2 ^ piMaxBits entries of two bytes, indexed with
the next piMaxBits input bits. Each entry holds symbol * 16 +
code length, 0 for bit patterns without a code.
@param piLengths The code lengths of the symbols (0 = symbol unused)
@param piCount The number of symbols
@param pmTable OUTPUT The lookup table
@param piMaxBits OUTPUT The number of bits used to index the table
*/
|
|
|
|
CopyStoredBlock (memptr)
|
Copies a block stored without compression to the output
Notes :
@param pmInput The compressed data
*/
|
|
|
|
DecodeBlock (memptr, memptr, integer, memptr, integer)
|
Decodes the Huffman codes of a compressed block
Notes :
@param pmInput The compressed data
@param pmLiteralTable The lookup table of the literal / length code
@param piLiteralBits The index bits of the literal / length table
@param pmDistanceTable The lookup table of the distance code
@param piDistanceBits The index bits of the distance table
*/
|
|
|
|
DecodeDynamicTables (memptr, integer, integer)
|
Reads the code lengths of a block with dynamic Huffman codes
and builds its lookup tables
Notes :
@param pmInput The compressed data
@param piLiteralBits OUTPUT The index bits of the literal / length table
@param piDistanceBits OUTPUT The index bits of the distance table
*/
|
|
|
|
INTEGER DecodeSymbol (memptr, memptr, integer)
|
Decodes the next symbol of a Huffman code
Notes :
@param pmInput The compressed data
@param pmTable The lookup table of the Huffman code
@param piMaxBits The index bits of the lookup table
@return The symbol
*/
|
|
|
|
DropBits (integer)
|
Removes bits from the bit buffer
Notes :
@param piCount The number of bits
*/
|
|
|
|
EnsureCapacity (int64)
|
Makes sure the output buffer can hold data up to a position
Notes : The buffer is doubled when its size is not known in advance
@param piLastPosition The last position that will be written
*/
|
|
|
|
FillBits (memptr, integer)
|
Reads input bytes into the bit buffer until it holds at least
the requested number of bits or the input is exhausted
Notes : At most 16 bits are requested, so the buffer stays below 24 bits
@param pmInput The compressed data
@param piCount The number of bits
*/
|
|
|
|
INTEGER GetBits (memptr, integer)
|
Reads a value of up to 16 bits from the input
Notes : Least significant bit first
@param pmInput The compressed data
@param piCount The number of bits
@return The value
*/
|
|
|
|
Inflate (memptr, int64, int64, int64, memptr)
|
Decompresses Deflate compressed data from a range of a MEMPTR
Notes : The caller is responsible for freeing the MEMPTR. When the size
of the decompressed data is known (e.g. from a ZIP entry), the
output buffer is allocated once and larger output is rejected.
@param pmInput The memory holding the compressed data
@param piStart The 1-based position of the compressed data
@param piLength The length of the compressed data in bytes
@param piExpectedSize The size of the decompressed data in bytes, ? when unknown
@param pmOutput OUTPUT The decompressed data
*/
|
|
|
|
Inflate (memptr, memptr)
|
Decompresses Deflate compressed data
Notes : The caller is responsible for freeing the MEMPTR
@param pmInput The compressed data
@param pmOutput OUTPUT The decompressed data
*/
|