Index: dumpHTML.inc
===================================================================
--- dumpHTML.inc	(révision 16820)
+++ dumpHTML.inc	(copie de travail)
@@ -48,6 +48,9 @@
 	# Has setupGlobals been called?
 	var $setupDone = false;
 
+	# Has to compress html pages
+	var $compress = false;
+
 	# List of raw pages used in the current article
 	var $rawPages;
 
@@ -478,6 +481,11 @@
 		$fullName = "{$this->dest}/$filename";
 		$fullDir = dirname( $fullName );
 
+		if ($this->compress) {
+			$fullName .= ".gz";
+			$text = gzencode($text, 9);				
+		}
+
 		wfMkdirParents( $fullDir, 0755 );
 
 		wfSuppressWarnings();
@@ -619,6 +627,7 @@
 			}
 		}
 
+	
 		$sk =& $wgUser->getSkin();
 		ob_start();
 		$sk->outputPage( $wgOut );
@@ -739,6 +748,7 @@
 				$url = str_replace( '$1', "../$iw/" . wfUrlencode( $this->getHashedFilename( $title ) ),
 					$wgArticlePath );
 			}
+			$url .= $this->compress ? ".gz" : "";
 			return false;
 		} else {
 			return true;
@@ -773,7 +783,7 @@
 		if ( $url === false ) {
 			$url = str_replace( '$1', wfUrlencode( $this->getHashedFilename( $title ) ), $wgArticlePath );
 		}
-
+		$url .= $this->compress ? ".gz" : "";
 		return false;
 	}
 
Index: dumpHTML.php
===================================================================
--- dumpHTML.php	(révision 16820)
+++ dumpHTML.php	(copie de travail)
@@ -23,6 +23,7 @@
  * --force-copy         copy commons instead of symlink, needed for Wikimedia
  * --interlang          allow interlanguage links
  * --image-snapshot     copy all images used to the destination directory
+ * --compress           generate compressed version of the html pages
  */
 
 
@@ -91,6 +92,7 @@
 	'sliceNumerator' => $sliceNumerator,
 	'sliceDenominator' => $sliceDenominator,
 	'noOverwrite' => $options['no-overwrite'],
+	'compress' => $options['compress'],
 ));
 
 
