private void writePalette(OutputStream os, int num_of_color) throws Exception {
        int index = 0;
        byte colors[] = new byte[num_of_color*3];
        
        for (int i=0; i<num_of_color; i++)
	    {
		  colors[index++] = (byte)(((colorPalette[i]>>16)&0xff));
		  colors[index++] = (byte)(((colorPalette[i]>>8)&0xff));
		  colors[index++] = (byte)(colorPalette[i]&0xff);
	    }
        
	    os.write(colors, 0, num_of_color*3);
	}
Write out a zero length data sub-block
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGIFWriter.java