eqZip Class

This section describes methods for creates ZIP archive. 

OpenArchive()  


Open ZIP archive file.

Syntax:

eqZIP::OpenArchive(m.tcZipName, m.tnAppend)

Parameters: 

m.tcZipName 

  The ZIP archive file.

 m.tnAppend

   A append flag. 

 Return values 

  .T. - Archive create/open successfully.
  .F. -  Archive do not create/open successfully. 

CloseArchive()  


Close ZIP archive file.

Syntax:  

eqZIP::CloseArchive(m.tcComment)

Parameters:

m.tcComment

   ZIP archive comment.

 

OpenNewFile()  


Open file handle.

Syntax:

eqZIP::OpenNewFile(m.tcFileName, m.ttCreated, m.llIWontUTF8, m.lcPassword, m.liCRC32)

Parameters:  

m.tcFileName

   File name in ZIP archive. 

m.ttCreated

   Datetime created. 

m.llIWontUTF8

   A wish uses UTF-8 for encoding file name.

For UTF-8 encoding or password is needy zlib.dll version 1.25 or higher.

m.lcPassword

  File password.

 m.liCRC32

  File CRC32 checksum. it is mandatory for m.lcPassword. Checksum is for all data.

 

Return values
       0 - File append to ZIP archive.
  -102 - ZIP_PARAMERROR
  -103 - ZIP_BADZIPFILE
  -104 - ZIP_INTERNALERROR   

AppendFile()  


Add some file to ZIP archive.

Syntax:   

eqZIP::AppendFile(m.tcFilename, m.tcNameInArchive, m.llIWontUTF8, m.lcPassword)

Parameters:    

m.tcFileName

   The source file name.

m.tcNameInArchive

    File name in ZIP archive. 

m.llIWontUTF8
   A wish uses UTF-8 for encoding file name.

For UTF-8 encoding  or password is needy zlib.dll version 1.25 or higher.

m.lcPassword

  File password.

Return values 
  -1 - The source file doesn't exists 
  -2 - The source file cannot open
   0 - File append to ZIP archive 
  -102 - ZIP_PARAMERROR
  -103 - ZIP_BADZIPFILE
  -104 - ZIP_INTERNALERROR

WriteData()  


Write data to opened file handle. 

Syntax:  

eqZIP::WriteData(m.tcData)

Parameters:  

m.tcData
   Data which will be write to file handle. 

Return values
  -102 - ZIP_PARAMERROR
  -103 - ZIP_BADZIPFILE
  -104 - ZIP_INTERNALERROR

CloseFile()  


Close file handle.

Syntax: 

eqZIP::CloseFile()

SYS2007()


Calculate CRC32 checksum for data.

Syntax: 

eqZIP::SYS2007(m.lcData)

Parameters:  

m.lcData
   Data which calculate CRC32 checksum.