1<?php
2
3class OutputFilterGZip extends OutputFilter {
4  function content_type() {
5    return null;
6    //    return ContentType::gz();
7  }
8
9  function process($tmp_filename) {
10    $output_file = $tmp_filename.'.gz';
11
12    $file = gzopen($output_file, "wb");
13    gzwrite($file, file_get_contents($tmp_filename));
14    gzclose($file);
15
16    unlink($tmp_filename);
17    return $output_file;
18  }
19}
20?>