16 word compSize, uncompSize;
17 dword outSize = 0, NrBlocks = 0, CurrentBlock = 0;
27 void (*PercentFinishedCallback) (dword PercentFinished) = pPercentFinishedCallback;
34 while(uncompSize != 0xfefe)
38 if(uncompSize > 0x8000)
57 while(uncompSize != 0xfefe)
59 if(PercentFinishedCallback) PercentFinishedCallback(CurrentBlock * 100 / NrBlocks);
62 if(uncompSize > 0x8000)
72 if(compSize == uncompSize)
75 if(pDest) memcpy(pDest, pSrc, uncompSize);
88 if(pDest) pDest += uncompSize;
90 outSize += uncompSize;
95 if(PercentFinishedCallback) PercentFinishedCallback(100);
dword UncompressLoader(byte *pSrc, byte *pDest, void *pPercentFinishedCallback)
word UncompressBlock(byte *inputbuffer, word inputsize, byte *outputbuffer, word BufferSize)