Filter/Compress/Gz.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Filter
- Version
- $Id$
\Zend_Filter_Compress_Gz
Package: Zend_Filter






Compression adapter for Gzip (ZLib)
- Parent(s)
- \Zend_Filter_Compress_CompressAbstract
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

array $_options = array('level' => 9, 'mode' => 'compress', 'archive' => null)Compression Options
array(
'level' => Compression level 0-9
'mode' => Compression mode, can be 'compress', 'deflate'
'archive' => Archive to use
)
Default value
array('level' => 9, 'mode' => 'compress', 'archive' => null)Details- Type
- array
Methods

__construct(array | \Zend_Config | null $options = null) : voidClass constructor
Parameters
| Name | Type | Description |
|---|---|---|
| $options | array | \Zend_Config | null | (Optional) Options to set |

compress(string $content) : stringCompresses the given content
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $content | string |
| Type | Description |
|---|---|
| string |

decompress(string $content) : stringDecompresses the given content
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $content | string |
| Type | Description |
|---|---|
| string |

setArchive(string $archive) : \Zend_Filter_Compress_GzSets the archive to use for de-/compression
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $archive | string | Archive to use |
| Type | Description |
|---|---|
| \Zend_Filter_Compress_Gz |

setLevel(integer $level) : \Zend_Filter_Compress_GzSets a new compression level
Parameters
Returns
| Name | Type | Description |
|---|---|---|
| $level | integer |
| Type | Description |
|---|---|
| \Zend_Filter_Compress_Gz |

setMode(string $mode) : voidSets a new compression mode
Parameters
| Name | Type | Description |
|---|---|---|
| $mode | string | Supported are 'compress', 'deflate' and 'file' |