Das Konzept der Schleife macht den Code lesbarer. Dies ist keine

funktionale Änderung
This commit is contained in:
Yamagi Burmeister 2010-06-17 05:52:57 +00:00
parent a43af52578
commit d6eabc3ccf

View file

@ -265,109 +265,23 @@ Huff1Decompress(cblock_t in) {
while (count) {
inbyte = *input++;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
int i = 0;
if (!--count)
break;
for (i = 0; i < 8; i++) {
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
if (!--count)
break;
nodenum = cin.numhnodes1[nodenum];
}
nodenum = hnodes[nodenum * 2 + (inbyte & 1)];
inbyte >>= 1;
}
if (input - in.data != in.count && input - in.data != in.count + 1) {