Class Horde_Compress_zip

Description

The Horde_Compress_zip class allows ZIP files to be created and read.

Located in /Compress/Compress/zip.php (line 41)

Horde_Compress
   |
   --Horde_Compress_zip
Variable Summary
 string $_ctrlDirEnd
 string $_fileHeader
 array $_methods
Method Summary
 boolean checkZipData (string $data)
 string compress (array $data, [array $params = array()])
 mixed decompress (string $data, array $params)
Variables
string $_ctrlDirEnd = "\x50\x4b\x05\x06\x00\x00\x00\x00" (line 71)

End of central directory record.

string $_ctrlDirHeader = "\x50\x4b\x01\x02" (line 64)

Beginning of central directory record.

string $_fileHeader = "\x50\x4b\x03\x04" (line 78)

Beginning of file contents.

array $_methods = array(
0x0 => 'None',
0x1 => 'Shrunk',
0x2 => 'Super Fast',
0x3 => 'Fast',
0x4 => 'Normal',
0x5 => 'Maximum',
0x6 => 'Imploded',
0x8 => 'Deflated'
)
(line 48)

ZIP compression methods.

Methods
checkZipData (line 256)

Checks to see if the data is a valid ZIP file.

  • return: True if valid, false if invalid.
boolean checkZipData (string $data)
  • string $data: The ZIP file data.
compress (line 95)

Create a ZIP compressed file from an array of file data.

  • return: The ZIP file.
string compress (array $data, [array $params = array()])
  • array $data: The data to compress.
     Requires an array of arrays - each subarray should contain the
     following fields:
     'data' (string)   --  The data to compress.
     'name' (string)   --  The pathname to the file.
     'time' (integer)  --  [optional] The timestamp to use for the file.
  • array $params: The parameter array (unused).

Redefinition of:
Horde_Compress::compress()
Compress the data.
decompress (line 126)

Decompress a ZIP file and get information from it.

  • return: The requested data.
mixed decompress (string $data, array $params)
  • string $data: The zipfile data.
  • array $params: The parameter array.
     The following parameters are REQUIRED:
     'action' (integer)  =>  The action to take on the data.  Either
                             HORDE_COMPRESS_ZIP_LIST or
                             HORDE_COMPRESS_ZIP_DATA.
    
     The following parameters are REQUIRED for HORDE_COMPRESS_ZIP_DATA also:
     'info' (array)   =>  The zipfile list.
     'key' (integer)  =>  The position of the file in the archive list.

Redefinition of:
Horde_Compress::decompress()
Decompress the data.

Inherited Methods

Inherited From Horde_Compress

 Horde_Compress::Horde_Compress()
 Horde_Compress::compress()
 Horde_Compress::decompress()
 Horde_Compress::factory()
 Horde_Compress::singleton()

Documentation generated on Sun, 30 Jan 2011 05:23:34 +0000 by phpDocumentor 1.4.3