 package aerys.qark
 {
+	import flash.display.BitmapData;
 	import flash.utils.ByteArray;
+	import flash.utils.IExternalizable;
 	import flash.utils.describeType;
 	import flash.utils.getDefinitionByName;
 	import flash.utils.getQualifiedClassName;
 
 	public class Qark
 	{
-		private static const FLAG_OBJECT		: int		= 0;
-		private static const FLAG_ARRAY			: int		= 1;
-		private static const FLAG_INTEGER		: int		= 2;
-		private static const FLAG_FLOAT			: int		= 3;
-		private static const FLAG_STRING		: int		= 4;
-		private static const FLAG_UTF_STRING	: int		= 5;
-		private static const FLAG_BYTES			: int		= 6;
-		private static const FLAG_BOOLEAN		: int		= 7;
-		private static const FLAG_CUSTOM		: int		= 8;
-		
-		private static const ENCODERS		: Array		= [encodeObject,
+		private static const FLAG_CUSTOM		: int		= 0;
+		private static const FLAG_OBJECT		: int		= 1;
+		private static const FLAG_ARRAY			: int		= 2;
+		private static const FLAG_INTEGER		: int		= 3;
+		private static const FLAG_FLOAT			: int		= 4;
+		private static const FLAG_STRING		: int		= 5;
+		private static const FLAG_UTF_STRING	: int		= 6;
+		private static const FLAG_BYTES			: int		= 7;
+		private static const FLAG_BOOLEAN		: int		= 8;
+		private static const FLAG_BITMAP_DATA	: int		= 9;
+		
+		
+		private static const ENCODERS		: Array		= [encodeCustomObject,
+														   encodeObject,
 														   encodeArray,
 														   encodeInteger,
 														   encodeFloat,

														   decodeUTFString,
														   decodeBytes,
														   decodeBoolean,
														   decodeCustomObject];
		
		private static function getTypeFlag(source : *) : int
		{

														   encodeUTFString,
														   encodeBytes,
														   encodeBoolean,
														   encodeBitmapData];
		
		private static const DECODERS		: Array		= [decodeCustomObject,
														   decodeObject,
														   decodeArray,
														   decodeInteger,
														   decodeFloat,
