 		{
 			data.position = 0;
 			var uncompressed:ByteArray = new ByteArray();
+			var chunk:ByteArray = new ByteArray();
 			var outBytesLength:int = data.length * 2;
 			
 			var err:int;

						// unknown error
						if (err != JZlib.Z_OK)
						{
							if (stream.msg == null) {
								trace("Unknown error. Error code : " + err);
							}
							else {
								trace("Unknown error. Error code : " + err + " and message : " + stream.msg);
							}
						}
				}
				
				outcount++;
				//trace("Zlib.uncompress. outcount: " + outcount + ", stream.total_out: " + stream.total_out);

				if (!checkError(stream, err, "inflate"))
				{
					break;

			data.position = 0;
			var compressed:ByteArray = new ByteArray();
			var err:int;
			
			trace("Zlib.compress. data.length: " + data.length);
			trace("Zlib.compress. data: " + data.toString());
			
			// How is this number build?
			var outLen:int = Math.round(data.length * 1.001) + 1 + 12;
			
			var stream:ZStream = new ZStream();

			err = stream.deflateInit(JZlib.Z_BEST_COMPRESSION);
