$canCompress
$canCompress : boolean
Does this driver support compressing data?
This class allows tar files to be read.
compress(array $data, array $params = array()) : mixed
Compresses the data.
array | $data | The data to compress. Requires an array of arrays. Each subarray should contain these fields:
|
array | $params | The parameter array.
|
The TAR file as either a string or a stream resource.
compressDirectory(string $directory, array $params = array()) : mixed
Compresses a directory.
string | $directory | The directory to recursively compress. |
array | $params | An array of arguments needed to compress the data. |
The compressed data.
decompress(mixed $data, array $params = array()) : array
Decompresses the data.
mixed | $data | The data to decompress. |
array | $params | An array of arguments needed to decompress the data. |
Tar file data:
KEY: Position in the array VALUES: attr - File attributes data - Raw file contents date - File modification time name - Filename size - Original file size type - File type
_formatNumber(array $file, string $method) : string
Formats a number from the file information for the TAR format.
array | $file | A file hash from compress() that may include a 'spl' entry with an . |
string | $method | The method of the SplFileInfo object that returns the requested number. |
The correctly formatted number.