Okay for anyone else wanting to do this, here goes:
First download your current filter list and save it as subscription_latest.txt
Then using gzip (google gzip for Windows if you don't have linux) and then, through a command prompt do:
Code: Select all
type subscription_latest.txt | gzip -9 -f > subscription_latest.gz
from the directory you save subscription_latest.txt to, then upload subscription_latest.gz to your server.
Then make a new PHP file and paste the following into it:
Code: Select all
<?php
if(substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
global $HTTP_ACCEPT_ENCODING;
if( headers_sent() ){
$encoding = false;
}elseif( strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false ){
$encoding = 'x-gzip';
}elseif( strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false ){
$encoding = 'gzip';
}else{
$encoding = false;
}
header('Content-Encoding: ' .$encoding);
print(file_get_contents("subscription_latest.gz"));
}else{
// Path to your normal (uncompressed) list
include_once("subscription.php");
}
?>
Make sure subscription.php (or whatever your normal list name is) and subscription_latest.gz are in the same directory as the php file. And you're done

You can test if your new PHP file is serving gzipped content properly by inputting the URL
here.
GZip compression without CPU load...

Now to move this live and start optimizing the list.