Repository navigation
Yoshihiro Yamazaki edited this page Nov 28, 2026
·
2 revisions
IO_Zip の公開メソッドとプロパティの一覧です。レコードのキーは 設計、コード例は 利用方 にあります。
| メソッド | 内容 |
|---|---|
parse($zipdata, $offset = 0) |
ZIP のバイト列を $offset から読み、chunkList, offsetOfPayload, offsetOfCentralDirectory に入れる。前の結果は消える。途中でデータが尽きると IO_Bit_Exception
|
dump($opt = array()) |
chunkList と 2 つの位置を表示する。$opt は今は使わない |
IO_Zip::signatureName($sig) |
4 バイトのシグネチャの名前 (static)。知らないものは Unknown Signature
|
signatureName() が知っている名前は次のとおりです。
| シグネチャ | 名前 |
|---|---|
PK\x01\x02 |
Central directory structure |
PK\x03\x04 |
Local file header |
PK\x05\x05 |
Digital signature |
PK\x05\x06 |
End of central directory record |
PK\x06\x06 |
Zip64 end of central directory record |
PK\x06\x07 |
Zip64 end of central directory locator |
PK\x06\x08 |
Archive extra data record |
Zip64 の 2 つは名前があるだけで、parse() は読みません。
どちらも public ですが、parse() から呼ばれるものです。
| メソッド | 内容 |
|---|---|
getDosTime(&$reader) |
IO_Bit から 2 バイトを読み、Hour, Minute, Second の配列で返す |
getDosDate(&$reader) |
IO_Bit から 2 バイトを読み、Year, Month, Day の配列で返す |
| プロパティ | 内容 |
|---|---|
chunkList |
レコードの配列。parse() の前は null
|
offsetOfPayload |
最初の、長さが 0 でないファイルデータの位置。無ければ null
|
offsetOfCentralDirectory |
最初の中央ディレクトリのレコードの位置。無ければ null
|