Calculates the size of LZO encoding structure.

Syntax

IppStatus ippsEncodeLZOGetSize(IppLZOMethod method, Ipp32u maxInputLen, Ipp32u* pSize);

Include Files

ippdc.h

Domain Dependencies

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

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

Parameters

method

Specifies required LZO compression method, possible values are listed in Table "method Parameter").

maxInputLen

Specifies maximum length of input data buffer during compression operations. Not required for IppLZO1XST compression method.

pSize

Pointer to the variable, receiving the size of LZO encoding structure.

Description

This function calculates the size of the memory buffer that must be allocated for the LZO encoding structure.

For the single-thread compression (method = IppLZO1XST) the size of the structure is fixed, and the value of the maxInputLen parameter is ignored, for example, it can be set to 0.

For the multi-threaded compression (method = IppLZO1XMT) maxInputLen parameter is important and affects the size of the structure. If it is set to 0, then each compression operation starts with memory allocation for internal buffers and ends with memory freeing. This significantly decreases the performance of compression/decompression.

Code example shows how the Intel IPP functions for the LZO compression can be used.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error if the pointer pSize is NULL.

ippStsBadArgErr

Indicates an error if the parameter method has an illegal value.

Example

LZO.c

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.