Performs LZ77 encoding according to the specified compression level.
IppStatus ippsDeflateLZ77_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 comprLevel, IppLZ77Flush flush);
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. |
comprLevel |
Compression level in range [0..9] in accordance with ZLIB. |
flush |
Specifies the encoding mode for data blocks (see flush Parameter). |
The function ippsDeflateLZ77 is declared in the ippdc.h file. This function performs LZ77 encoding of source data ppSrc according to the compression level comprLevel, which is similar to the ZLIB compression level.
The table pHashHead must be initialized with value -winSize for correct processing the first bytes of the source vector.
The function parameter pSrcIdx returns the index of the current position in the source vector and is used to correlate the current position in the source vector and indexes in the hash tables. After processing each 2GB of source data, this index and hash tables must be normalized (instead of 64K of source data in ZLIB).
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if one of the specified pointers is NULL. |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.