Root > Reference > All Classes > TZipFile > Methods > TZipFile.Add

Method TZipFile.Add

Previous pageReturn to chapter overviewNext page   

Add a file to the ZIP file

 

Add a memory file to the ZIP file

 

Add a memory file to the ZIP file

 

Add a memory file to the ZIP file. Allows programmer to specify the Local and Central Header data for more flexibility on what gets written. Minimal vailidation is done on the Header parameters; speficying bad options could result in a corrupted zip file.

 

Unit

EZip

 

Syntax

 

Code (Delphi)

public

procedure Add(

const FileName: string;

ArchiveFileName: string = '';

Compression: TZipCompression = zcDeflate

); overload;

 

procedure Add(

Data: TBytes;

ArchiveFileName: string;

Compression: TZipCompression = zcDeflate

); overload;

 

procedure Add(

Data: TStream;

ArchiveFileName: string;

Compression: TZipCompression = zcDeflate

); overload;

 

procedure Add(

Data: TStream;

LocalHeader: TZipHeader;

CentralHeader: PZipHeader = nil

); overload;

 

Parameters

FileName

FileName to be added

 

ArchiveFileName

Path + Name of file in the arcive. If Ommitted, ExtractFileName(FileName) will be used.

 

Compression

Compression mode.

 

Data

Bytes to be added

 

ArchiveFileName

Path + Name of file in the arcive.

 

Compression

Compression mode.

 

Data

Stream of file to be added

 

ArchiveFileName

Path + Name of file in the arcive.

 

Compression

Compression mode.

 

Data

Stream of file to be added

 

LocalHeader

The local header data

 

CentralHeader

A Pointer to an optional central header. If no central Header is provided, the Local Header information is used.

 

See also




Send feedback... Build date: 2018-11-26
Last edited: 2018-11-26
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_method_ezip_tzipfile_add.php