Setting gzip_output=1 in the conf/local.php file was not working on my setup. I investigated the issue and found the problem to be lying in the themes... and the default theme has the problem too.
# grep flush lib/tpl/*/main.php
lib/tpl/default/main.php: <?php flush()?>
lib/tpl/default/main.php: <?php flush()?>
lib/tpl/incognitek/main.php: <?php flush()?>
lib/tpl/usable/main.php: <?php flush();?>
lib/tpl/usable/main.php: <?php flush();?>
If we insert a die() statement just before the first flush() of the current theme, the page is compressed.
If we insert a die() right after the first flush(), the page is no longer compressed.
(one can use this kind of tool
http://www.gidnetwork.com/tools/gzip-test.php to quickly check for gzip compression on an URL)
This is due to the use of flush() inside the lib/tpl/*/main.php files, without issuing an ob_flush() before (see
http://php.net/flush/ to know why)
Inserting an ob_flush() before each flush() does fix the issue.