Horde_Compress_Rar
extends Horde_Compress_Base
in package
This class allows rar files to be read.
Tags
Table of Contents
- BLOCK_START = "Rar!\x1a\x07\x00"
- $canCompress : bool
- Does this driver support compressing data?
- $canDecompress : bool
- Does this driver support decompressing data?
- $_logger : Horde_Log_Logger
- Logger
- $_methods : array<string|int, mixed>
- Rar compression methods
- __construct() : mixed
- Constructor.
- compress() : mixed
- Compresses the data.
- compressDirectory() : mixed
- Compresses a directory.
- decompress() : array<string|int, mixed>
- Decompresses the data.
Constants
BLOCK_START
public
mixed
BLOCK_START
= "Rar!\x1a\x07\x00"
Properties
$canCompress
Does this driver support compressing data?
public
bool
$canCompress
= \false
$canDecompress
Does this driver support decompressing data?
public
bool
$canDecompress
= \true
$_logger
Logger
protected
Horde_Log_Logger
$_logger
$_methods
Rar compression methods
protected
array<string|int, mixed>
$_methods
= array(0x30 => 'Store', 0x31 => 'Fastest', 0x32 => 'Fast', 0x33 => 'Normal', 0x34 => 'Good', 0x35 => 'Best')
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $options : array<string|int, mixed> = array()
-
Additional options for the compressor backend.
Return values
mixed —compress()
Compresses the data.
public
compress(mixed $data[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $data : mixed
-
The data to compress.
- $params : array<string|int, mixed> = array()
-
An array of arguments needed to compress the data.
Tags
Return values
mixed —The compressed data.
compressDirectory()
Compresses a directory.
public
compressDirectory(string $directory[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $directory : string
-
The directory to recursively compress.
- $params : array<string|int, mixed> = array()
-
An array of arguments needed to compress the data.
Tags
Return values
mixed —The compressed data.
decompress()
Decompresses the data.
public
decompress(mixed $data[, array<string|int, mixed> $params = array() ]) : array<string|int, mixed>
Parameters
- $data : mixed
-
The data to decompress.
- $params : array<string|int, mixed> = array()
-
An array of arguments needed to decompress the data.
Tags
Return values
array<string|int, mixed> —Info on the compressed file:
KEY: Position in RAR archive VALUES: attr - File attributes date - File modification time csize - Compressed file size method - Compression method name - Filename size - Original file size