if (code > currentSlot) SWT.error(SWT.ERROR_INVALID_IMAGE);
void decode() {	int code;	int oc = 0;	int fc = 0;	byte[] buf = new byte[imageWidth];	int stackIndex = 0;	int bufIndex = 0;	int c;	while ((c = nextCode()) != endCode) {		if (c == clearCode) {			codeSize = bitsPerPixel + 1;			codeMask = MASK_TABLE[bitsPerPixel];			currentSlot = newCodes;			topSlot = 1 << codeSize;			while ((c = nextCode()) == clearCode) {}			if (c != endCode) {				oc = fc = c;				buf[bufIndex] = (byte)c;				bufIndex++;				if (bufIndex == imageWidth) {					nextPutPixels(buf);					bufIndex = 0;				}			}		} else {			code = c;			if (code >= currentSlot) {				if (code > currentSlot)					SWT.error(SWT.ERROR_INVALID_IMAGE);				code = oc;				stack[stackIndex] = fc;				stackIndex++;			}			while (code >= newCodes) {				stack[stackIndex] = suffix[code];				stackIndex++;				code = prefix[code];			}			stack[stackIndex] = code;			stackIndex++;			if (currentSlot < topSlot) {				fc = code;				suffix[currentSlot] = fc;				prefix[currentSlot] = oc;				currentSlot++;				oc = c;			}			if (currentSlot >= topSlot) {				if (codeSize < 12) {					codeMask = MASK_TABLE[codeSize];					codeSize++;					topSlot = topSlot + topSlot;				}			}			while (stackIndex > 0) {				stackIndex--;				buf[bufIndex] = (byte)stack[stackIndex];				bufIndex++;				if (bufIndex == imageWidth) {					nextPutPixels(buf);					bufIndex = 0;				}			}		}	}	if (bufIndex != 0 && line < imageHeight) {		nextPutPixels(buf);	}}