Careful. Don't get these two confused...
Here's a quote from the developer's website
mod_gzip is an Internet Content Acceleration module for the poular Apache Web Server. It compresses the contents delivered to the client. There is no need to install any additional software on the client!
As you pointed out with your quote,
mod_gzip is an Apache module that does just what you described. But the "Use gzip compression" found under the 4images admin control panel has nothing to do with this web server module. It has everything to do with "downloading as zip", database backups and a few other 4images features.
A quick search of the 4images php code turns up the following uses:
4images/admin
admin_functions.php: global $site_db, $start_time, $alluserinfo, $do_gzip_compress, $nozip, $config;
admin_functions.php: if ($do_gzip_compress) {
admin_functions.php: if (eregi("gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"])) {
admin_functions.php: $encoding = "gzip";
admin_functions.php: elseif (eregi("x-gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"])) {
admin_functions.php: $encoding = "x-gzip";
admin_functions.php: $gzip_contents = ob_get_contents();
admin_functions.php: $s .= sprintf("<!-- Not compress length: %s -->\n", strlen($gzip_contents));
admin_functions.php: $s .= sprintf("<!-- Compressed length: %s -->\n", strlen(gzcompress($gzip_contents, $config['gz_compress_level'])));
admin_functions.php: $gzip_contents .= $s;
admin_functions.php: $gzip_size = strlen($gzip_contents);
admin_functions.php: $gzip_crc = crc32($gzip_contents);
admin_functions.php: $gzip_contents = gzcompress($gzip_contents, $config['gz_compress_level']);
admin_functions.php: $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
admin_functions.php: echo $gzip_contents;
admin_functions.php: echo pack("V", $gzip_crc);
admin_functions.php: echo pack("V", $gzip_size);
backup.php:$nozip = 1;
email.php:$nozip = 1;
resizer.php:$nozip = 1;
stats.php:$nozip = 1;
thumbnailer.php:$nozip = 1;
validateimages.php:$nozip = 1;
4images/includes
functions.php: $download_zip_button = (function_exists("gzcompress") && function_exists("crc32")) ? "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />" : "";
functions.php: $download_zip_button = ($target == "" && function_exists("gzcompress") && function_exists("crc32")) ? "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=zip&".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>" : "";
functions.php: $download_zip_button = (function_exists("gzcompress") && function_exists("crc32")) ? "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />" : "";
functions.php: $download_zip_button = ($target == "" && function_exists("gzcompress") && function_exists("crc32")) ? "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=zip&".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download_zip.gif")."\" align=\"absmiddle\" border=\"0\" alt=\"\" /></a>" : "";
functions.php: "download_zip_button" => $download_zip_button,
page_footer.php: $gzip_text = ($config['gz_compress'] == 1) ? "GZIP compression enabled" : "GZIP compression disabled";
page_footer.php: $gzip_text .= ($config['gz_compress'] == 1 && !extension_loaded("zlib")) ? "*" : "";
page_footer.php: printf("<p align=\"center\"><font size=\"-2\">Page generated in %f seconds with ".$site_db->query_count." queries, spending %f seconds doing MySQL queries and %f doing PHP things. $gzip_text</p>", $total_time, $sql_time, $php_time);
page_footer.php:if ($do_gzip_compress) {
page_footer.php: if (eregi("gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"])) {
page_footer.php: $encoding = "gzip";
page_footer.php: elseif (eregi("x-gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"])) {
page_footer.php: $encoding = "x-gzip";
page_footer.php: $gzip_contents = ob_get_contents();
page_footer.php: $s .= sprintf("\n<!-- Not compress length: %s -->", strlen($gzip_contents));
page_footer.php: $s .= sprintf("\n<!-- Compressed length: %s -->", strlen(gzcompress($gzip_contents, $config['gz_compress_level'])));
page_footer.php: $gzip_contents .= $s;
page_footer.php: $gzip_size = strlen($gzip_contents);
page_footer.php: $gzip_crc = crc32($gzip_contents);
page_footer.php: $gzip_contents = gzcompress($gzip_contents, $config['gz_compress_level']);
page_footer.php: $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
page_footer.php: echo $gzip_contents;
page_footer.php: echo pack("V", $gzip_crc);
page_footer.php: echo pack("V", $gzip_size);
upload_definitions.php:$mime_type_match['gz'] = array("application/gzip", "application/x-gzip-compressed");
upload_definitions.php:$mime_type_match['zip'] = array("application/zip", "application/x-zip-compressed");
zip.php: * File: zip.php *
zip.php:makes zip files on the fly...
zip.php: "\x00\x00"; // .zip file comment length
4images/
download.php:$nozip = 1;
download.php: include(ROOT_PATH."includes/zip.php");
download.php: $zipfile = new zipfile();
download.php: $zipfile->add_file($file_data, $file_name);
download.php: $file['file_name'] = time().".zip";
download.php: $file['file_data'] = $zipfile->file();
download.php: if ($action == "zip" && !eregi("\.zip$", $file['file_name']) && function_exists("gzcompress") && function_exists("crc32")) {
download.php: include(ROOT_PATH."includes/zip.php");
download.php: $zipfile = new zipfile();
download.php: $zipfile->add_file($file['file_data'], $file['file_name']);
download.php: $file['file_data'] = $zipfile->file();
download.php: $file['file_name'] = get_file_name($file['file_name']).".zip";
download.php: $disposition = (!eregi("\.zip$", $file['file_name']) && $action != "zip" && $action != "lightbox") ? 'attachment' : 'inline';
global.php:$do_gzip_compress = 0;
global.php:if ($config['gz_compress'] == 1 && !isset($nozip)) {
global.php: if (eregi("gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) || eregi("x-gzip", $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"])) {
global.php: $do_gzip_compress = 1;
lightbox.php: $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>";
lightbox.php: $download_button = "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />";
login.php:$nozip = 1;
logout.php:$nozip = 1;
quotation.php: $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=lightbox")."\"><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"".$lang['alt_download_zip']."\" /></a>";
quotation.php: $download_button = "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"".$lang['alt_download_zip_no_file']."\" />";
Nowhere is 4images compressing the parsed output of php generated pages for rendering in the user's browser. That's a function of the web server software.
Hope this clears things up a little bit.
