Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

DeflateLZ77Slow

Performs LZ77 encoding according to the slow algorithm and parameters of a match.

Syntax

IppStatus ippsDeflateLZ77Slow_8u(const Ipp8u** ppSrc, Ipp32u* pSrcLen, Ipp32u* pSrcIdx, const Ipp8u* pWindow, Ipp32u winSize, Ipp32s* pHashHead, Ipp32s* pHashPrev, Ipp32u hashSize, IppDeflateFreqTable pLitFreqTable[286], IppDeflateFreqTable pDistFreqTable[30], Ipp8u* pLitDst, Ipp16u* pDistDst, Ipp32u* pDstLen, int* pVecMatch, IppLZ77Flush flush);

Include Files

ippdc.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

ppSrc

Double pointer to the source vector.

pSrcLen

Pointer to the length of the source vector.

pSrcIdx

Pointer to the index of the current position in the source vector.

pWindow

Pointer to the sliding window (the dictionary for the LZ77 algorithm).

winSize

Size of the sliding window and the pHashPrev table.

pHashHead

Pointer to the table containing heads of the hash chains.

pHashPrev

Pointer to the table contating indexes to the previous strings with the same hash key.

hashSize

Size of the pHashHead table.

pLitFreqTable

Pointer to the literals/lengths frequency table.

pDistFreqTable

Pointer to the distances frequency table.

pLitDst

Pointer to the destination vector containing literals/lengths.

pDistDst

Pointer to the destination vector containing distances.

pDstLen

Pointer to the length of the destination vectors.

pVecMatch

Pointer to the vector containing the following parameters of a match: max_chain_length, good_match, nice_match, max_lazy_match (for more information, see [ZLIB]).

flush

Specifies the encoding mode for data blocks (see flush parameter).

Description

This function performs LZ77 encoding of source data ppSrc according to the slow algorithm and match parameters.

To correctly process the first bytes of the source vector, initialize the pHashHead table with the winSize value.

The pSrcIdx parameter returns the index of the current position in the source vector, and is used to establish a correlation between the current position in the source vector and indexes in hash tables. After processing each 2GB of source data, the index and hash tables must be normalized (instead of 64K of source data in ZLIB).

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error if winSize is less than 256 or more than 32768 or hashSize is less than 256 or more than 65536.

ippStsBadArgErr

Indicates an error when good_match, nice_match, or max_lazy_match is less than 4, or max_chain_length is less than 1.