<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>The HttpDeflateStream class</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="http.request.options.html">Request Options</a></div> <div class="next" style="text-align: right; float: right;"><a href="httpdeflatestream.construct.html">HttpDeflateStream::__construct</a></div> <div class="up"><a href="book.http.html">HTTP</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="class.httpdeflatestream" class="reference"> <h1 class="title">The <a href="class.httpdeflatestream.html" class="classname">HttpDeflateStream</a> class</h1> <div class="partintro"><p class="verinfo">(PECL pecl_http >= 0.21.0)</p> <div class="section" id="httpdeflatestream.synopsis"> <h2 class="title">Class synopsis</h2> <div class="classsynopsis"> <div class="ooclass"></div> <div class="classsynopsisinfo"> <span class="ooclass"><strong class="classname">HttpDeflateStream</strong></span> {</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><a href="httpdeflatestream.construct.html" class="methodname">__construct</a></span> ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span> ] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">static public</span> <span class="type">HttpDeflateStream</span> <span class="methodname"><a href="httpdeflatestream.factory.html" class="methodname">factory</a></span> ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code><span class="initializer"> = "HttpDeflateStream"</span></span> ]] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="httpdeflatestream.finish.html" class="methodname">finish</a></span> ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span> ] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="httpdeflatestream.flush.html" class="methodname">flush</a></span> ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span> ] )</div> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="httpdeflatestream.update.html" class="methodname">update</a></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span> )</div> }</div> </div> <div class="section" id="http.httpdeflatestream.members"> <h2 class="title">Class Members</h2> <div class="section" id="http.httpdeflatestream.constants"> <h2 class="title">Predefined Constants</h2> <table class="doctable table"> <thead> <tr> <th>Type</th> <th>Name</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>int</td> <td>TYPE_GZIP</td> <td>gzip encoding</td> </tr> <tr> <td>int</td> <td>TYPE_ZLIB</td> <td>zlib AKA deflate encoding</td> </tr> <tr> <td>int</td> <td>TYPE_RAW</td> <td>raw deflate encoding</td> </tr> <tr> <td>int</td> <td>LEVEL_DEF</td> <td>default compression level</td> </tr> <tr> <td>int</td> <td>LEVEL_MIN</td> <td>minimum compression level</td> </tr> <tr> <td>int</td> <td>LEVEL_MAX</td> <td>maximum compression level</td> </tr> <tr> <td>int</td> <td>STRATEGY_DEF</td> <td>default strategy</td> </tr> <tr> <td>int</td> <td>STRATEGY_FILT</td> <td>filtered strategy</td> </tr> <tr> <td>int</td> <td>STRATEGY_HUFF</td> <td>Huffman strategy</td> </tr> <tr> <td>int</td> <td>STRATEGY_RLE</td> <td>RLE strategy</td> </tr> <tr> <td>int</td> <td>STRATEGY_FIXED</td> <td>fixed strategy</td> </tr> <tr> <td>int</td> <td>FLUSH_NONE</td> <td>no forced flush</td> </tr> <tr> <td>int</td> <td>FLUSH_SYNC</td> <td>synching flush</td> </tr> <tr> <td>int</td> <td>FLUSH_FULL</td> <td>full flush</td> </tr> </tbody> </table> </div> </div> <div class="section"> <h2 class="title">Examples</h2> <p class="para"> <div class="example" id="example-4349"> <p><strong>Example #1 A <strong class="classname">HttpDeflateStream</strong> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$stream </span><span style="color: #007700">= new </span><span style="color: #0000BB">HttpDeflateStream</span><span style="color: #007700">(<br /> </span><span style="color: #0000BB">HttpDeflateStream</span><span style="color: #007700">::</span><span style="color: #0000BB">TYPE_GZIP </span><span style="color: #007700">|<br /> </span><span style="color: #0000BB">HttpDeflateStream</span><span style="color: #007700">::</span><span style="color: #0000BB">LEVEL_MAX </span><span style="color: #007700">|<br /> </span><span style="color: #0000BB">HttpDeflateStream</span><span style="color: #007700">::</span><span style="color: #0000BB">FLUSH_SYNC</span><span style="color: #007700">);<br /><br />echo </span><span style="color: #0000BB">$stream</span><span style="color: #007700">-></span><span style="color: #0000BB">update</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$stream</span><span style="color: #007700">-></span><span style="color: #0000BB">finish</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> </div> <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="httpdeflatestream.construct.html">HttpDeflateStream::__construct</a> — HttpDeflateStream class constructor</li><li><a href="httpdeflatestream.factory.html">HttpDeflateStream::factory</a> — HttpDeflateStream class factory</li><li><a href="httpdeflatestream.finish.html">HttpDeflateStream::finish</a> — Finalize deflate stream</li><li><a href="httpdeflatestream.flush.html">HttpDeflateStream::flush</a> — Flush deflate stream</li><li><a href="httpdeflatestream.update.html">HttpDeflateStream::update</a> — Update deflate stream</li></ul> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="http.request.options.html">Request Options</a></div> <div class="next" style="text-align: right; float: right;"><a href="httpdeflatestream.construct.html">HttpDeflateStream::__construct</a></div> <div class="up"><a href="book.http.html">HTTP</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>