[Overview][Types][Classes] Reference for unit 'zstream' (#fcl)

TGZFileStream.Create

Create a new instance of TGZFileStream

Declaration

Source position: zstream.pp line 99

public constructor TGZFileStream.Create(

  FileName: String;

  FileMode: TGZOpenMode

);

Arguments

FileName

  

Name of the gzip file

FileMode

  

Open mode for the file.

Description

Createcreates a new instance of the TGZFileStreamclass. It opens FileNamefor reading or writing, depending on the FileModeparameter. It is not possible to open the file read-write. If the file is opened for reading, it must exist.

If the file is opened for reading, the TGZFileStream.Readmethod can be used for reading the data in uncompressed form.

If the file is opened for writing, any data written using the TGZFileStream.Writemethod will be stored in the file in compressed (deflated) form.

Errors

If the file is not found, an EZlibErrorexception is raised.

See also

Destroy

  

Removes TGZFileStreaminstance

TGZOpenMode

  

Open mode for gzip file.