17 word compSize = 0, uncompSize = 0;
18 dword outSize = 0, NrBlocks = 0, CurrentBlock = 0;
28 void (*PercentFinishedCallback) (dword PercentFinished) = pPercentFinishedCallback;
35 while(uncompSize != 0xfefe)
39 if(uncompSize > 0x8000)
58 while(uncompSize != 0xfefe)
60 if(PercentFinishedCallback) PercentFinishedCallback(CurrentBlock * 100 / NrBlocks);
63 if(uncompSize > 0x8000)
73 if(compSize == uncompSize)
76 if(pDest) memcpy(pDest, pSrc, uncompSize);
89 if(pDest) pDest += uncompSize;
91 outSize += uncompSize;
96 if(PercentFinishedCallback) PercentFinishedCallback(100);
dword UncompressFirmware(byte *pSrc, byte *pDest, void *pPercentFinishedCallback)
word UncompressBlock(byte *inputbuffer, word inputsize, byte *outputbuffer, word BufferSize)