CompressFast
in package
Provides fast compression of strings using the best-available algorithm.
Tags
Table of Contents
- $driver : string
- $compress : CompressFastDriver
- Compression driver
- __construct() : mixed
- Constructor.
- __get() : mixed
- compress() : string
- Compresses a string.
- decompress() : string
- Decompresses a string.
Properties
$driver
public
string
$driver
Returns the name of the compression driver used.
$compress
Compression driver
protected
CompressFastDriver
$compress
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $opts = [] ]) : mixed
Parameters
- $opts : array<string|int, mixed> = []
-
Options:
- drivers: (array) A list of driver names (Horde_Compress_Fast_Base class names) to use instead of auto-detecting. - zlib: (bool) Consider zlib to be a "fast" compression algorithm. Only used if 'drivers' is empty. (@since 1.1.0).
Tags
Return values
mixed —__get()
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —compress()
Compresses a string.
public
compress(string $text) : string
Parameters
- $text : string
-
The string to compress.
Tags
Return values
string —The compressed string.
decompress()
Decompresses a string.
public
decompress(string $text) : string
Parameters
- $text : string
-
The compressed string.
Tags
Return values
string —The decompressed string.