Contents - Index - Previous - Next


ZipFromBuffer method

 

Applies to

TVCLZip component

 

Declaration

function ZipFromBuffer(Buffer: PChar; Amount: Longint; FName: string): Integer;

 

Description

The ZipFromBuffer method allows you to zip information directly from a memory buffer specified by the Buffer parameter. The length of the buffer MUST be specified in the Amount parameter.  The filename information that should be stored with the file in the archive must be passed in the FName parameter.

  

Return Value  

The return value will be 1 if the buffer was zipped and 0 if it was not successfully zipped. 

 

As an example of using ZipFromBuffer, you might use it to directly zip the contents of a TMemo component such as: 

 

    Zipper.ZipFromBuffer(PChar(TextMemo.Lines.Text), Length(TextMemo.Lines.Text), CurrentFile);