function setEncoding($enc = 'gzip, deflate')
    {
        if (function_exists('gzdeflate')) {
            $this->protocol_version = '1.1';
            $this->setHeader('Accept-Encoding', $enc);
            if (!isset($this->outgoing_headers['Connection'])) {
                $this->setHeader('Connection', 'close');
                $this->persistentConnection = FALSE;
            }
            // deprecated as of PHP 5.3.0
            //set_magic_quotes_runtime(0);
            $this->encoding = $enc;
        }
    }