Top Method Summary
Options Name Purpose
Deflate (memptr, int64, int64, memptr) Compresses a range of a MEMPTR Notes : The caller is responsible for freeing the MEMPTR. Empty input produces a block holding only the end of block code. @param pmInput The memory holding the data @param piStart The 1-based position of the data @param piLength The length of the data in bytes @param pmOutput OUTPUT The Deflate compressed data */
Deflate (memptr, memptr) Compresses the whole content of a MEMPTR Notes : The caller is responsible for freeing the MEMPTR @param pmInput The data @param pmOutput OUTPUT The Deflate compressed data */
EnsureCapacity (int64) Makes sure the output buffer can hold data up to a position Notes : The buffer is doubled when it is full @param piLastPosition The last position that will be written */
FindMatch (memptr, int64, int64, integer, integer) Finds the longest earlier occurrence of the bytes at a position Notes : Follows the hash chain of the next three bytes, at most MaxChainLength candidates within the window @param pmInput The data @param piPosition The current position @param piEnd The last position of the data @param piMatchLength OUTPUT The length of the longest match, 0 for none @param piDistance OUTPUT The distance of the longest match */
INTEGER GetHash (memptr, int64) Returns the hash value of the three bytes at a position Notes : @param pmInput The data @param piPosition The position @return The hash value (0 to iHashSize - 1) */
InsertHash (memptr, int64) Adds a position to the hash chains Notes : @param pmInput The data @param piPosition The position */
PutBits (integer, integer) Writes bits to the output Notes : Least significant bit first, at most 16 bits @param piValue The value @param piCount The number of bits */
PutMatch (integer, integer) Writes a match as length and distance code Notes : @param piLength The length of the match (3 to 258) @param piDistance The distance of the match (1 to 32768) */
PutSymbol (integer) Writes the fixed Huffman code of a literal / length symbol Notes : @param piSymbol The symbol (0 to 287) */
INTEGER ReverseBits (integer, integer) Reverses the order of the lowest bits of a value Notes : Huffman codes are packed starting with the most significant bit @param piValue The value @param piCount The number of bits @return The value with reversed bits */

Top Constructor Summary
Options Name Purpose
Deflater () Static constructor of the Deflater class Notes : Builds the fixed Huffman codes and the length and distance code lookup tables */

Top Property Summary
Options Name Purpose
INTEGER GoodMatchLength
INTEGER MaxChainLength


Method Detail
Top

Deflate (memptr, int64, int64, memptr)

Purpose: Compresses a range of a MEMPTR
Notes : The caller is responsible for freeing the MEMPTR. Empty input
produces a block holding only the end of block code.

Parameters:
pmInput MEMPTR
The memory holding the data
piStart INT64
The 1-based position of the data
piLength INT64
The length of the data in bytes
pmOutput MEMPTR
OUTPUT The Deflate compressed data
Top

Deflate (memptr, memptr)

Purpose: Compresses the whole content of a MEMPTR
Notes : The caller is responsible for freeing the MEMPTR

Parameters:
pmInput MEMPTR
The data
pmOutput MEMPTR
OUTPUT The Deflate compressed data
Top

EnsureCapacity (int64)

Purpose: Makes sure the output buffer can hold data up to a position
Notes : The buffer is doubled when it is full

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

FindMatch (memptr, int64, int64, integer, integer)

Purpose: Finds the longest earlier occurrence of the bytes at a position
Notes : Follows the hash chain of the next three bytes, at most
MaxChainLength candidates within the window

Parameters:
pmInput MEMPTR
The data
piPosition INT64
The current position
piEnd INT64
The last position of the data
piMatchLength INTEGER
OUTPUT The length of the longest match, 0 for none
piDistance INTEGER
OUTPUT The distance of the longest match
Top

INTEGER GetHash (memptr, int64)

Purpose: Returns the hash value of the three bytes at a position
Notes :

Parameters:
pmInput MEMPTR
The data
piPosition INT64
The position
Returns INTEGER
The hash value (0 to iHashSize - 1)
Top

InsertHash (memptr, int64)

Purpose: Adds a position to the hash chains
Notes :

Parameters:
pmInput MEMPTR
The data
piPosition INT64
The position
Top

PutBits (integer, integer)

Purpose: Writes bits to the output
Notes : Least significant bit first, at most 16 bits

Parameters:
piValue INTEGER
The value
piCount INTEGER
The number of bits
Top

PutMatch (integer, integer)

Purpose: Writes a match as length and distance code
Notes :

Parameters:
piLength INTEGER
The length of the match (3 to 258)
piDistance INTEGER
The distance of the match (1 to 32768)
Top

PutSymbol (integer)

Purpose: Writes the fixed Huffman code of a literal / length symbol
Notes :

Parameters:
piSymbol INTEGER
The symbol (0 to 287)
Top

INTEGER ReverseBits (integer, integer)

Purpose: Reverses the order of the lowest bits of a value
Notes : Huffman codes are packed starting with the most significant bit

Parameters:
piValue INTEGER
The value
piCount INTEGER
The number of bits
Returns INTEGER
The value with reversed bits


Constructor Detail
Top

STATIC Deflater ()

Purpose: Static constructor of the Deflater class
Notes : Builds the fixed Huffman codes and the length and distance code
lookup tables



Property Detail
Top

INTEGER GoodMatchLength


Returns INTEGER
Top

INTEGER MaxChainLength


Returns INTEGER


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