Sign in Join
FPDoc Onlineexperiment

TGZFileStream.write function

Member of TGZFileStreampublicIn unit ZStream

Write data to be compressed.

Declaration

pascal
function write(const buffer; count: LongInt): LongInt; override

Arguments

buffer

Memory location containing the data to be written.

count

Number of bytes to write.

Function result

Number of uncompressed bytes written.

Description

Write writes Count bytes from Buffer to the compressed file. The data is compressed as it is written, so ideally, less than Count bytes end up in the compressed file. Note that it is not possible to write to the stream if it was opened in read mode.

The function returns the number of (uncompressed) bytes that were actually written.

Errors

In case of an error, an EZlibError exception is raised.

See also

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