Sign in Join
FPDoc Onlineexperiment

TGZFileStream.create constructor

Member of TGZFileStreampublicIn unit ZStream

Create a new instance of TGZFileStream.

Declaration

pascal
constructor create(filename: ansistring; filemode: Tgzopenmode)

Arguments

filename

Name of the gzip file.

filemode

Open mode for the file.

Description

Create creates a new instance of the TGZFileStream class. It opens FileName for reading or writing, depending on the FileMode parameter. 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 Read method can be used for reading the data in uncompressed form.

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

Errors

If the file is not found, an EZlibError exception is raised.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.