For compressing pages (if supported by browser) in the file includes/gzip.php defined class Gzip, which is automatically initialized each time the page.
void init () – Initiates compression. Output buffering is turned on, the necessary HTTP headers are detected and transmitted.
void do_gzip () – Provides compressed data, clears (erases) the output buffer and disables output buffering.
string ob_callback (string $buffer, string $phase) – Processes the output buffer.
string ob_gz_callback (string $buffer, string $phase) – Processes output buffer with data compression.
string minify_html (string $buffer) – HTML seal.
string minify_html_light (string $buffer) – Embedded HTML Seal Option.
Example:
Custom::inc('includes/gzip.php');
// start process of recording in the buffer
Gzip::init();
// ...
// program execution
// ...
// outputs the compressed data from the buffer
Gzip::do_gzip();