I'm running that code, only the advanced editor bug. (It strips line breaks if you edit a post in advanced mode). Other than that, no problems whatsoever.
Riuji, unless you see a difference between my code and yours (I don't).
Code:
//Logician Hack:
$page_byte=strlen($output);
$output=preg_replace ('/\r\n(\s*)/', "\r\n", $output);
$output=preg_replace ('/<!-- .*? -->/',"",$output);
$pagenew_byte=strlen($output);
$page_kilobyte=number_format(($page_byte/1024),2);
$pagenew_kilobyte=number_format(($pagenew_byte/1024),2);
$pagesaved_byte=$page_byte-$pagenew_byte;
$pagesaved_kilobyte=number_format((($pagesaved_byte)/1024),2);
$pagesaved_perc=number_format(((100*$pagesaved_byte)/$page_byte),2);
$output = str_replace('</body>', '<center><span class="smallfont">[Output: ' . $page_kilobyte . ' Kb. CMP <b>' . $pagenew_kilobyte . '</b> Kb. Net <b>' . $pagesaved_kilobyte . '</b> Kb. (' . $pagesaved_perc . '%)]</span></center>
<br></body>', $output);
//Logician Hack:
I'd LOVE to see it keep a running tally in the admincp of kb saved.