PECompact CODEC Plug-ins

DecodeFast Exposed Function


DWORD WINAPI DecodeFast(LPVOID lpvSource, LPVOID lpvDest,  PEC2_DECODE_EXTRA *pExtra);

Parameters:

lpvSource
The address of the beginning of the data you wish to decode.

lpvDest
The address at which to place the decoded data. This buffer is guaranteed to be at least the size of the decoded data.

pExtra

Pointer to a PEC2_DECODE_EXTRA object. This parameter is NULL for the loader decoder, but non-NULL when decoding host module data and code blocks.

Return Value:

If successful, the return value is the size, in bytes, of the decoded data. If unsuccessful, the return value is PEC2_CODEC_ERROR_UNSPECIFIED (-1).

Remarks:

This is the 'fast' decoder that is faster than the 'small' decoder, but larger in decoder size. The DecodeFast function must be a contiguous block of memory with no outside references.