GzipCompressor now uses the right functions
authorRoland Häder <roland@mxchange.org>
Wed, 31 Aug 2011 20:30:56 +0000 (20:30 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 31 Aug 2011 20:30:56 +0000 (20:30 +0000)
inc/classes/main/compressor/class_GzipCompressor.php

index 000fc84..9210904 100644 (file)
@@ -42,7 +42,7 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor {
                $compressorInstance = NULL;
 
                // Get new instance
-               if ((function_exists('gzcompress')) && (function_exists('gzuncompress'))) {
+               if ((function_exists('gzencode')) && (function_exists('gzdecode'))) {
                        // Compressor can maybe be used
                        $compressorInstance = new GzipCompressor();
                } // END - if
@@ -65,7 +65,7 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor {
                } // END - if
 
                // Return the compressed stream
-               return gzcompress($streamData, 1);
+               return gzencode($streamData, 1);
        }
 
        /**
@@ -82,7 +82,7 @@ class GzipCompressor extends BaseFrameworkSystem implements Compressor {
                } // END - if
 
                // Return the decompressed stream
-               return gzuncompress($streamData);
+               return gzdecode($streamData);
        }
 
        /**