Gzip
实现 ExtractableInterfaceArchive 包的 Gzip 格式适配器
此类受到 Horde 项目的 Compress 包的启发,并在代码和概念上大量借鉴了该包 http://www.horde.org
| 贡献者 |
Michael Slusarz [email protected] Michael Cochrane [email protected] |
|---|---|
| 自 |
1.0 |
| 包 |
Joomla 框架 |
方法
__construct
创建一个新的 Archive 对象。
__construct(array|\ArrayAccess options = []) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- options
array<string|int, mixed>|ArrayAccess选项数组
响应
混合
extract
将 Gzip 压缩文件解压到给定路径
extract( archive, destination) :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
参数
- archive
string要解压的 ZIP 归档文件的路径- destination
string解压归档文件的路径
响应
bool如果成功则为 True
getFilePosition
获取归档文件的档案数据偏移量
getFilePosition() :
| 自 |
1.0 |
|---|---|
| 抛出 |
|
响应
int归档文件的档案数据位置标记
isSupported
测试此适配器是否可以在此计算机上解压文件。
isSupported() :
静态
| 自 |
1.0 |
|---|
响应
bool如果受支持则为 True
常量
FLAGS
Gzip 文件标志。
| 值 | ['FTEXT' => 0x1, 'FHCRC' => 0x2, 'FEXTRA' => 0x4, 'FNAME' => 0x8, 'FCOMMENT' => 0x10] |
|---|---|
| 自 |
1.0 |
类型
array<string|int, mixed>
属性
data
Gzip 文件数据缓冲区
| 自 |
1.0 |
|---|
类型
string
options
保存选项数组。
| 自 |
1.0 |
|---|
类型
array<string|int, mixed>|ArrayAccess