DeflateHuff

Performs Huffman encoding .

Syntax

IppStatus ippsDeflateHuff_8u(const Ipp8u* pLitSrc, const Ipp16u* pDistSrc, Ipp32u srcLen, Ipp8u* pCode, Ipp32u* pCodeLenBits, IppDeflateHuffCode* pLitHuffCodes[256], IppDeflateHuffCode* pDistHuffCodes[30], Ipp8u* pDst, Ipp32u* pDstIdx);

Parameters

pLitSrc

Pointer to the literals/lengths source vector.

pDistSrc

Pointer to the distances source vector.

srcLen

Length of the source vectors.

pCode

Pointer to the bit buffer.

pCodeLenBits

Pointer to the number of valid bits in the bit buffer.

pLitHuffCodes

Pointer to the literals/lengths Huffman codes.

pDistHuffCodes

Pointer to the distances Huffman codes.

pDst

Pointer to the destination vector.

pDstIdx

Pointer to the index in the destination vector.

Description

The function ippsDeflateHuff is declared in the ippdc.h file. This function performs Huffman encoding of source data.

The function parameter pDstIdx returns the index of the current position in the destination vector: zlib uses the intermediate buffer for the Huffman encoding and we need to know the indexes of the first (input parameter) and the last (output parameter) symbols, which are written by the function.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.