HttpDeflateStream

(no version information, might be only in CVS)

HttpDeflateStream -- HTTP Deflate Stream Class

Synopsis

class HttpDeflateStream

Class Members

Predefined Constants

Table 1.

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

Methods

HttpDeflateStream::factory()
HttpDeflateStream::__construct()
HttpDeflateStream::update()
HttpDeflateStream::flush()
HttpDeflateStream::finish()

Examples

Example 1. A HttpDeflateStream example

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

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