Top Method Summary
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 */

Top Constructor Summary
Options Name Purpose
Inflater () Static constructor of the Inflater class Notes : Builds the lookup tables of the fixed Huffman codes */


Method Detail
Top

BuildTable (integer[], integer, memptr, integer)

Purpose: 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.

Parameters:
piLengths INTEGER
The code lengths of the symbols (0 = symbol unused)
piCount INTEGER
The number of symbols
pmTable MEMPTR
OUTPUT The lookup table
piMaxBits INTEGER
OUTPUT The number of bits used to index the table
Top

CopyStoredBlock (memptr)

Purpose: Copies a block stored without compression to the output
Notes :

Parameters:
pmInput MEMPTR
The compressed data
Top

DecodeBlock (memptr, memptr, integer, memptr, integer)

Purpose: Decodes the Huffman codes of a compressed block
Notes :

Parameters:
pmInput MEMPTR
The compressed data
pmLiteralTable MEMPTR
The lookup table of the literal / length code
piLiteralBits INTEGER
The index bits of the literal / length table
pmDistanceTable MEMPTR
The lookup table of the distance code
piDistanceBits INTEGER
The index bits of the distance table
Top

DecodeDynamicTables (memptr, integer, integer)

Purpose: Reads the code lengths of a block with dynamic Huffman codes
and builds its lookup tables
Notes :

Parameters:
pmInput MEMPTR
The compressed data
piLiteralBits INTEGER
OUTPUT The index bits of the literal / length table
piDistanceBits INTEGER
OUTPUT The index bits of the distance table
Top

INTEGER DecodeSymbol (memptr, memptr, integer)

Purpose: Decodes the next symbol of a Huffman code
Notes :

Parameters:
pmInput MEMPTR
The compressed data
pmTable MEMPTR
The lookup table of the Huffman code
piMaxBits INTEGER
The index bits of the lookup table
Returns INTEGER
The symbol
Top

DropBits (integer)

Purpose: Removes bits from the bit buffer
Notes :

Parameters:
piCount INTEGER
The number of bits
Top

EnsureCapacity (int64)

Purpose: 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

Parameters:
piLastPosition INT64
The last position that will be written
Top

FillBits (memptr, integer)

Purpose: 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

Parameters:
pmInput MEMPTR
The compressed data
piCount INTEGER
The number of bits
Top

INTEGER GetBits (memptr, integer)

Purpose: Reads a value of up to 16 bits from the input
Notes : Least significant bit first

Parameters:
pmInput MEMPTR
The compressed data
piCount INTEGER
The number of bits
Returns INTEGER
The value
Top

Inflate (memptr, int64, int64, int64, memptr)

Purpose: 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.

Parameters:
pmInput MEMPTR
The memory holding the compressed data
piStart INT64
The 1-based position of the compressed data
piLength INT64
The length of the compressed data in bytes
piExpectedSize INT64
The size of the decompressed data in bytes, ? when unknown
pmOutput MEMPTR
OUTPUT The decompressed data
Top

Inflate (memptr, memptr)

Purpose: Decompresses Deflate compressed data
Notes : The caller is responsible for freeing the MEMPTR

Parameters:
pmInput MEMPTR
The compressed data
pmOutput MEMPTR
OUTPUT The decompressed data


Constructor Detail
Top

STATIC Inflater ()

Purpose: Static constructor of the Inflater class
Notes : Builds the lookup tables of the fixed Huffman codes



©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       09.11.2026 08:04:38