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,6 +265,9 @@ Huff1Decompress(cblock_t in) {
while (count) {
inbyte = *input++;
int i = 0;
for (i = 0; i < 8; i++) {
if (nodenum < 256) {
hnodes = hnodesbase + (nodenum << 9);
*out_p++ = nodenum;
@ -278,96 +281,7 @@ Huff1Decompress(cblock_t in) {
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) {