1.3 CRYPT_HUFFMAN_DeCompress Function

C

int CRYPT_HUFFMAN_DeCompress(
    unsigned char* out, 
    unsigned int outSz, 
    const unsigned char* in, 
    unsigned int inSz
);

Description

This function decompresses a block of data using Huffman encoding.

Preconditions

None.

Parameters

ParametersDescription
outPointer to destination buffer.
outSzSize of destination buffer.
inPointer to source buffer to decompress.
inSzSize of source buffer to decompress.

Returns

  • negative - Error code.

  • positive - Bytes stored in the out buffer.

Remarks

Output buffer must be large enough to hold the contents of the operation.

Example

unsigned char cBuffer[1024];
unsigned char dBuffer[1024];

int ret

ret = CRYPT_HUFFMAN_DeCompress(dBuffer, sizeof(dBuffer), cBuffer, msglen);