mysql driver updated
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index 29db904..3547301 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -83,7 +83,14 @@
 	 */
 	public function db_connect()
 	{
-		return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
+		if ($this->compress === TRUE)
+		{
+			return @mysql_connect($this->hostname, $this->username, $this->password, TRUE, MYSQL_CLIENT_COMPRESS);
+		}
+		else
+		{
+			return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
+		}
 	}
 
 	// --------------------------------------------------------------------
@@ -95,7 +102,14 @@
 	 */
 	public function db_pconnect()
 	{
-		return @mysql_pconnect($this->hostname, $this->username, $this->password);
+		if ($this->compress === TRUE)
+		{
+			return @mysql_pconnect($this->hostname, $this->username, $this->password, MYSQL_CLIENT_COMPRESS);
+		}
+		else
+		{
+			return @mysql_pconnect($this->hostname, $this->username, $this->password);
+		}
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 475857c..947c477 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -67,10 +67,12 @@
 	{
 		if ($this->compress === TRUE)
 		{
-			$port = NULL;
+			$port = empty($this->port) ? NULL : $this->port;
 
-			$mysqli = mysqli_init();
-			return $mysqli->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+			$link = mysqli_init();
+			$link->real_connect($this->hostname, $this->username, $this->password, $this->database, $port, NULL, MYSQLI_CLIENT_COMPRESS);
+
+			return $link;
 		}
 
 		return empty($this->port)