Skip to content

Latest commit

 

History

History
54 lines (34 loc) · 963 Bytes

GUID-F2B311A2-D0BF-4B03-B8B7-9C2A0AB73B47.md

File metadata and controls

54 lines (34 loc) · 963 Bytes

CRYPT_HUFFMAN_DeCompress Function

Parent topic:MPLAB® Harmony Crypto Library

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

Parameters Description
out Pointer to destination buffer.
outSz Size of destination buffer.
in Pointer to source buffer to decompress.
inSz Size 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);