//--------------------------------------
//			   PowerUI
//
//		For documentation or 
//	if you have any issues, visit
//		powerUI.kulestar.com
//
//	Copyright © 2013 Kulestar Ltd
//		  www.kulestar.com
//--------------------------------------

using System;
using BinaryIO;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;


namespace Gif{

	/// <summary>
	/// A comment block in a GIF stream.
	/// </summary>
	public class CommentBlock : GifBlock{
		
		/// <summary>The comments.</summary>
		public List<string> Comments;
		
		
		public override void Load(Reader reader){
			
			int nextFlag = reader.ReadByte();
			Comments = new List<string>();
			
			while(nextFlag != 0){
				
				int blockSize = nextFlag;
				string data = reader.ReadString(blockSize);
				Comments.Add(data);
				
				nextFlag = reader.ReadByte();
			}
			
		}
		
	}
	
}