|
|
|
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
*/
|