Decompression Source Code
Version 1.10 12/01/02 I-15
if (Sd->mDataIdx >= WNDSIZ) {
Sd->mDataIdx -= WNDSIZ;
}
r ++;
if (r >= NumOfBytes) {
return;
}
Sd->mBytesRemain --;
}
for (;;) {
c = DecodeC (Sd);
if (Sd->mBadTableFlag != 0) {
return;
}
if (c < 256) {
//
// Process an Original character
//
Sd->mBuffer[di++] = (UINT8)c;
r ++;
if (di >= WNDSIZ) {
return;
}
} else {
//
// Process a Pointer
//
c = (UINT16)(c - (UINT8_MAX + 1 - THRESHOLD));
Sd->mBytesRemain = c;
Sd->mDataIdx = (r - DecodeP(Sd) - 1) & (WNDSIZ - 1); //Make circular
di = r;
Sd->mBytesRemain --;
while ((INT16)(Sd->mBytesRemain) >= 0) {
Sd->mBuffer[di++] = Sd->mBuffer[Sd->mDataIdx++];
if (Sd->mDataIdx >= WNDSIZ) {
Sd->mDataIdx -= WNDSIZ;
}
r ++;
if (di >= WNDSIZ) {
return;
}
Sd->mBytesRemain --;
}
}
}
return;
}