public function setCompression(bool $active = true, int $level = -1)
  {
    if ($active) {
      # Extract Accept-Encoding request header (from Apache)
      $acceptEncoding = getAllheaders()['Accept-Encoding'] ?? '';

      # If the Client support GZip/Deflate Compression - do it!
      if (strpos($acceptEncoding, 'gzip') !== FALSE) {
        ini_set("zlib.output_compression", 2048); // Compression block size
        ini_set("zlib.output_compression_level", -1); // -1=Auto, 0=None, 9=Max
      } else {
        ini_set("zlib.output_compression_level", 0); // -1=Auto, 0=None, 9=Max
      }
    } else {
      ini_set("zlib.output_compression_level", 0); // -1=Auto, 0=None, 9=Max
    }

    return $this;
  }