Interfaces, Classes, Traits and Enums
- Compressor
Table of Contents
-
DEFAULT_LEVEL
= 7
-
DEFAULT_MAX_DECOMPRESSION_SIZE
= 2 * 1024 * 1024
-
DEFAULT_THRESHOLD
= 256
-
$instance
: self|null
-
$level
: int
-
$maxDecompressionSize
: int
-
$threshold
: int
-
__construct()
: mixed
-
compress()
: string
-
decompress()
: string
-
getInstance()
: self
-
reset()
: void
-
setInstance()
: void
-
willCompress()
: bool
-
make()
: self
-
zlib_encode()
: string
DEFAULT_LEVEL
public
mixed
DEFAULT_LEVEL
= 7
DEFAULT_MAX_DECOMPRESSION_SIZE
public
mixed
DEFAULT_MAX_DECOMPRESSION_SIZE
= 2 * 1024 * 1024
DEFAULT_THRESHOLD
public
mixed
DEFAULT_THRESHOLD
= 256
$instance
private
static self|null
$instance
= null
$level
private
int
$level
$maxDecompressionSize
private
int
$maxDecompressionSize
$threshold
private
int
$threshold
__construct()
public
__construct(int $level, int $minCompressionSize, int $maxDecompressionSize) : mixed
Parameters
-
$level
: int
-
-
$minCompressionSize
: int
-
-
$maxDecompressionSize
: int
-
Return values
mixed
—
compress()
public
compress(string $payload) : string
Parameters
-
$payload
: string
-
Return values
string
—
decompress()
public
decompress(string $payload) : string
Parameters
-
$payload
: string
-
-
throws
-
DecompressionException
Return values
string
—
getInstance()
public
static getInstance() : self
Return values
self
—
reset()
public
static reset() : void
Return values
void
—
setInstance()
public
static setInstance(self $instance) : void
Parameters
-
$instance
: self
-
Return values
void
—
willCompress()
public
willCompress(string $data) : bool
Parameters
-
$data
: string
-
Return values
bool
—
make()
private
static make() : self
-
see
-
SingletonTrait::make()
Return values
self
—
zlib_encode()
private
static zlib_encode(string $data, int $level) : string
Parameters
-
$data
: string
-
-
$level
: int
-
Return values
string
—