JavaScript Editor Javascript debugger     Website design 

HttpDeflateStream

HTTP Deflate Stream Class ()

Synopsis

class HttpDeflateStream

Class Members

Predefined Constants

Table 116. 

TypeNameDescription
intTYPE_GZIPgzip encoding
intTYPE_ZLIBzlib AKA deflate encoding
intTYPE_RAWraw deflate encoding
intLEVEL_DEFdefault compression level
intLEVEL_MINminimum compression level
intLEVEL_MAXmaximum compression level
intSTRATEGY_DEFdefault strategy
intSTRATEGY_FILTfiltered strategy
intSTRATEGY_HUFFHuffman strategy
intSTRATEGY_RLERLE strategy
intSTRATEGY_FIXEDfixed strategy
intFLUSH_NONEno forced flush
intFLUSH_SYNCsynching flush
intFLUSH_FULLfull flush


Examples

Example 873. A HttpDeflateStream example

<?php
$stream
= new HttpDeflateStream(
   
HttpDeflateStream::TYPE_GZIP |
   
HttpDeflateStream::LEVEL_MAX |
   
HttpDeflateStream::FLUSH_SYNC);

echo
$stream->update($data);
echo
$stream->finish();
?>