227. Class

227.1. Zend\Filter\Compress\Gz

Compression adapter for Gzip (ZLib)

227.1.1. Methods

227.1.1.1. __construct

__construct()

Class constructor

Parameters:null|array|Traversable – (Optional) Options to set
Throws ExceptionExtensionNotLoadedException:
 if zlib extension not loaded

227.1.1.2. getLevel

getLevel()

Returns the set compression level

Return type:integer

227.1.1.3. setLevel

setLevel()

Sets a new compression level

Parameters:integer
Throws ExceptionInvalidArgumentException:
 
Return type:Gz

227.1.1.4. getMode

getMode()

Returns the set compression mode

Return type:string

227.1.1.5. setMode

setMode()

Sets a new compression mode

Parameters:string – Supported are ‘compress’, ‘deflate’ and ‘file’
Return type:Gz
Throws :ExceptionInvalidArgumentException for invalid $mode value

227.1.1.6. getArchive

getArchive()

Returns the set archive

Return type:string

227.1.1.7. setArchive

setArchive()

Sets the archive to use for de-/compression

Parameters:string – Archive to use
Return type:Gz

227.1.1.8. compress

compress()

Compresses the given content

Parameters:string
Return type:string
Throws :ExceptionRuntimeException if unable to open archive or error during decompression

227.1.1.9. decompress

decompress()

Decompresses the given content

Parameters:string
Return type:string
Throws :ExceptionRuntimeException if unable to open archive or error during decompression

227.1.1.10. toString

toString()

Returns the adapter name

Return type:string