Compression adapter for Gzip (ZLib)
Class constructor
| Parameters: | null|array|Traversable – (Optional) Options to set |
|---|---|
| Throws ExceptionExtensionNotLoadedException: | |
| if zlib extension not loaded | |
Sets a new compression level
| Parameters: | integer – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Gz |
Sets a new compression mode
| Parameters: | string – Supported are ‘compress’, ‘deflate’ and ‘file’ |
|---|---|
| Return type: | Gz |
| Throws : | ExceptionInvalidArgumentException for invalid $mode value |
Sets the archive to use for de-/compression
| Parameters: | string – Archive to use |
|---|---|
| Return type: | Gz |
Compresses the given content
| Parameters: | string – |
|---|---|
| Return type: | string |
| Throws : | ExceptionRuntimeException if unable to open archive or error during decompression |
Decompresses the given content
| Parameters: | string – |
|---|---|
| Return type: | string |
| Throws : | ExceptionRuntimeException if unable to open archive or error during decompression |