 			return source.readInt();
 		}
 		
+		private static function encodeUnsignedInteger(source : uint, target : ByteArray) : void
+		{
+			target.writeUnsignedInt(source);
+		}
+		
+		private static function decodeUnsignedInteger(source : ByteArray) : uint
+		{
+			return source.readUnsignedInt();
+		}
+
 		private static function encodeFloat(source : Number, target : ByteArray) : void
 		{
 			target.writeFloat(source);

														   decodeObject,
														   decodeArray,
														   decodeInteger,
														   decodeFloat,
														   decodeString,
														   decodeUTFString,

{
	import flash.display.BitmapData;
	import flash.utils.ByteArray;
	import flash.utils.describeType;
	import flash.utils.getQualifiedClassName;

	public class Qark
	{
		private static const MAGIC				: uint	= 0x42;
		
		private static const FLAG_NONE			: uint	= 0;
		private static const FLAG_GZIP			: uint	= 1;
		private static const FLAG_DEFLATE		: uint	= 2;
		
		private static const TYPE_CUSTOM		: uint	= 0;
		private static const TYPE_OBJECT		: uint	= 1;
		private static const TYPE_ARRAY			: uint	= 2;
		private static const TYPE_INT			: uint	= 3;
		private static const TYPE_UINT			: uint	= 4;
		private static const TYPE_FLOAT			: uint	= 5;
		private static const TYPE_STRING		: uint	= 6;
		private static const TYPE_UTF_STRING	: uint	= 7;
		private static const TYPE_BYTES			: uint	= 8;
		private static const TYPE_BOOLEAN		: uint	= 9;
		private static const TYPE_BITMAP_DATA	: uint	= 10;
		
		
		private static const ENCODERS		: Array		= [encodeCustomObject,
														   encodeObject,
														   encodeArray,
														   encodeInteger,
														   encodeUnsignedInteger,
														   encodeFloat,
														   encodeString,
														   encodeUTFString,
