Compression adapter for Gzip (ZLib)

category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Filter_Compress_CompressAbstract

 Methods

Class constructor

__construct(array|\Zend_Config|null $options = null
inherited_from \Zend_Filter_Compress_CompressAbstract::__construct()

Parameters

$options

array\Zend_Confignull

(Optional) Options to set

Class constructor

__construct(array|\Zend_Config $options = null
Inherited

Parameters

$options

array\Zend_Config

(Optional) Options to set

Compresses the given content

compress(string $content) : string

Parameters

$content

string

Returns

string

Decompresses the given content

decompress(string $content) : string

Parameters

$content

string

Returns

string

Returns the set archive

getArchive() : string

Returns

string

Returns the set compression level

getLevel() : integer

Returns

integer

Returns the set compression mode

getMode() : string

Returns

string

Returns one or all set options

getOptions(string $option = null) : mixed
Inherited

Parameters

$option

string

(Optional) Option to return

Returns

mixed

Sets the archive to use for de-/compression

setArchive(string $archive) : \Zend_Filter_Compress_Gz

Parameters

$archive

string

Archive to use

Returns

\Zend_Filter_Compress_Gz

Sets a new compression level

setLevel(integer $level) : \Zend_Filter_Compress_Gz

Parameters

$level

integer

Returns

\Zend_Filter_Compress_Gz

Sets a new compression mode

setMode(string $mode) 

Parameters

$mode

string

Supported are 'compress', 'deflate' and 'file'

Sets all or one option

setOptions(array $options) : \Zend_Filter_Compress_Bz2
Inherited

Parameters

$options

array

Returns

\Zend_Filter_Compress_Bz2

Returns the adapter name

toString() : string

Returns

string

 Properties

 

Compression Options array( 'level' => Compression level 0-9 'mode' => Compression mode, can be 'compress', 'deflate' 'archive' => Archive to use )

$_options : array

Default

array('level' => 9, 'mode' => 'compress', 'archive' => null)