DecodeLZ77GetBlockType

Determines the type of encoded data block.

Syntax

IppStatus ippsDecodeLZ77GetBlockType_8u(Ipp8u** ppSrc, int* pSrcLen, IppLZ77HuffMode* pHuffMode, IppLZ77State_8u* pLZ77State);

Parameters

ppSrc

Double pointer to the source buffer.

pSrcLen

Pointer to the length of the source buffer.

pHuffMode

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

IppLZ77UseFixed Encoding with fixed Huffman codes.

IppLZ77UseDynamic Encoding with dynamic Huffman codes.

IppLZ77UseStored Stored block without Huffman coding.

pLZ77State

Pointer to the LZ77 decoding state structure.

Description

The function ippsDecodeLZ77GetBlockType is declared in the ippdc.h file. This function analyzes the source data ppSrc and returns the parameter pHuffMode which value indicates what Huffman decoding mode must be used for decoding the source bit stream. In accordance with this value the one of the functions ippsDecodeLZ77FixedHuff, ippsDecodeLZ77DynamicHuff, or ippsDecodeLZ77StoredBlockippsDecodeLZ77StoredBlock must be used.

Note iconNote

If you use only one specified encoding mode, then type of the input data for decoding is known, and this function is not necessary.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer ppLZ77State is NULL.

ippStsSizeErr

Indicates an error if SrcLen is less than or equal to 0.

ippStsSrcSizeLessExpected

Indicates a warning that the source buffer is insufficient (internal bit stream and source buffer do not contain enought bits to decode the type of block).

Submit feedback on this help topic

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