private void writeComment(OutputStream os, String comment) throws Exception {
    	os.write(EXTENSION_INTRODUCER);
		os.write(COMMENT_EXTENSION_LABEL);
		byte[] commentBytes = comment.getBytes();
		int numBlocks = commentBytes.length/0xff;
		int leftOver = commentBytes.length % 0xff;
		int offset = 0;
		if(numBlocks > 0) {
			for(int i = 0; i < numBlocks; i++) {
				os.write(0xff);
				os.write(commentBytes, offset, 0xff);
				offset += 0xff;
			}
		}
		if(leftOver > 0) {
			os.write(leftOver);
			os.write(commentBytes, offset, leftOver);
		}
		os.write(0);
    }
Writes a list of GIFFrame as an animated GIF

@param frames a list of GIFFrame
@param os OutputStream for the animated GIF
@throws Exception
subs/gif-revert/src/main/java/com/engineer/gif/revert/lib/AnimatedGIFWriter.java