EncodeLZ77SelectHuffMode

Determines the optimal encoding mode.

Syntax

IppStatus ippsEncodeLZ77SelectHuffMode_8u(IppLZ77Pair* pSrc, int srcLen, IppLZ77HuffMode* pHuffMode, IppLZ77State_8u* pLZ77State);

Parameters

pSrc

Pointer to the source buffer.

srcLen

Length of the source buffer.

pHuffMode

Pointer to the value of the parameter that specified the optimal encoding mode. Possible values are:

IppLZ77UseFixed Encoding with fixed Huffman codes.

IppLZ77UseDynamic Encoding with dynamic Huffman codes.

pLZ77State

Pointer to the LZ77 encoding state structure.

Description

The function ippsEncodeLZ77SelectHuffMode is declared in the ippdc.h file. This function analyzes the statistics of the source data stream pSrc of the IppLZ77Pair type and determines the optimal encoding mode - with dynamic Huffman codes or with fixed Huffman codes. The function returns the corresponding value of the parameter pHuffMode. Source data are produced by the function ippsEncodeLZ77.

This optimal mode is recommended, but you can use your own methods to encode the source data.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pLZ77State or pPairs pointer is NULL.

Submit feedback on this help topic

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