Index: javascript_aggregator.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/javascript_aggregator/Attic/javascript_aggregator.module,v
retrieving revision 1.16.2.5
diff -u -p -r1.16.2.5 javascript_aggregator.module
--- javascript_aggregator.module	5 Dec 2008 07:47:25 -0000	1.16.2.5
+++ javascript_aggregator.module	10 Dec 2008 00:00:08 -0000
@@ -74,6 +74,10 @@ function javascript_aggregator_cache($sc
 
       // Create the JavaScript file.
       file_save_data($contents, $jsfile, FILE_EXISTS_REPLACE);
+
+      if (variable_get('javascript_aggregator_gzip', FALSE)) {
+        file_save_data(gzencode($contents, 9), $jsfile .'.gz', FILE_EXISTS_REPLACE);
+      }
     }
 
 		// Adds excluded files again to the $scripts variable, making sure the aggregated file is on top.
@@ -135,6 +139,13 @@ function javascript_aggregator_form_alte
       '#description' => t('When enabled, will use the <a href="@jsmin">JSMin</a> library to compress the aggregated JavaScript file.', array('@jsmin' => 'http://code.google.com/p/jsmin-php/')),
     );
 
+    $form['javascript_aggregation']['javascript_aggregator_gzip'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Also store gzipped version'),
+      '#default_value' => variable_get('javascript_aggregator_gzip', FALSE),
+      '#description' => t('When enabled, will additionally store gzip (.gz) versions of each file. These can be served using an additional rule in .htaccess.'),
+    );
+
     $form['javascript_aggregation']['javascript_aggregator_exclude_js'] = array(
       '#type' => 'textarea',
       '#title' => t('Exclude from js aggregation'),
