Calculates the size of LZO encoding structure.
ippStatus ippsEncodeLZOGetSize(IppLZOMethod method, Ipp32u maxInputLen, Ipp32u* pSize);
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. |
The function ippsEncodeLZOGetSize is declared in the ippdc.h file. 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.
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. |
Copyright © 2000 - 2010, Intel Corporation. All rights reserved.