/* Initialize the decoder */
/* Set values for "special" numbers:
- * clear code reset the decoder
- * end code stop decoding
- * code size size of the next code to retrieve
- * max code next available table position
+ * clear code reset the decoder
+ * end code stop decoding
+ * code size size of the next code to retrieve
+ * max code next available table position
*/
clearCode = 1 << initialCodeSize;
endCode = clearCode + 1;
int label = _buf[0];
int count = -1;
switch (label) {
- case 0x01: // Plain Text Extension
- case 0xff: // Application Extension
- case 0xfe: // Comment Extension
+ case 0x01: // Plain Text Extension
+ case 0xff: // Application Extension
+ case 0xfe: // Comment Extension
break;
- case 0xf9: // Graphic Control Extension
- count = getDataBlock();
- if (count < 0) return true;
+ case 0xf9: // Graphic Control Extension
+ count = getDataBlock();
+ if (count < 0) return true;
// Check for transparency setting.
- if ((_buf[0] & HASTRANSPARENCY) != 0) trans_idx = _buf[3];
+ if ((_buf[0] & HASTRANSPARENCY) != 0) trans_idx = _buf[3];
else trans_idx = -1;
}
do { count = getDataBlock(); } while (count > 0);
private int bitsInWindow = 0;
// Class-wide constants.
- private static final int INTERLACE = 0x40;
- private static final int GLOBALCOLORMAP = 0x80;
- private static final int LOCALCOLORMAP = 0x80;
- private static final int HASTRANSPARENCY = 0x01;
- private static final int MAX_LWZ_BITS = 12;
- private static final int BUFSIZE = 280;
- private static final int[] _interlaceStep = { 8, 8, 4, 2 };
- private static final int[] _interlaceStart = { 0, 4, 2, 1 };
+ private static final int INTERLACE = 0x40;
+ private static final int GLOBALCOLORMAP = 0x80;
+ private static final int LOCALCOLORMAP = 0x80;
+ private static final int HASTRANSPARENCY = 0x01;
+ private static final int MAX_LWZ_BITS = 12;
+ private static final int BUFSIZE = 280;
+ private static final int[] _interlaceStep = { 8, 8, 4, 2 };
+ private static final int[] _interlaceStart = { 0, 4, 2, 1 };
}