Documentation

Gzip implements AdapterInterface

Interfaces, Classes and Traits

AdapterInterface

Table of Contents

$BufferSize  : int
compress()  : bool
Compress file into bzip.
extract()  : bool
Open and extract the archive.

Properties

$BufferSize

private int $BufferSize = 4096

Methods

compress()

Compress file into bzip.

public compress((string) $files[, (string) $destination = '' ][, (bool) $overwrite = false ][, (int) $mode = 9 ]) : bool
Parameters
$files : (string)

The file that you want to compress.

$destination : (string) = ''

The file destination.

$overwrite : (bool) = false

True to delete the file; False to not delete it.

$mode : (int) = 9

Level of gzip compression.

Tags
since
1.0.0
Return values
bool

True when succeeded; False when failed.

extract()

Open and extract the archive.

public extract([(string) $file = '' ][, (string) $target = '' ][, (bool) $delete = false ]) : bool
Parameters
$file : (string) = ''

The file that you want uncompress/open.

$target : (string) = ''

Where to extract the file.

$delete : (bool) = false

True to delete the file; False to not delete it.

Tags
since
1.0.0
Return values
bool

True when succeeded; False when failed.

Search results