Come da manuale (http://www.php.net/manual/en/function.ob-gzhandler.php):

Codice PHP:
ob_start("ob_gzhandler");