System.ZLib.TZCompressionStream.Write

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Write(const buffer; count: Longint): Longint; override;
function Write(const Buffer: TBytes; Offset, Count: Longint): Longint; override;

C++

virtual int __fastcall Write(const void *buffer, int count)/* overload */;
virtual int __fastcall Write(const System::DynamicArray<System::Byte> Buffer, int Offset, int Count)/* overload */;
inline int __fastcall  Write(const System::DynamicArray<System::Byte> Buffer, int Count){ return System::Classes::TStream::Write(Buffer, Count); }

Properties

Type Visibility Source Unit Parent
function public
System.ZLib.pas
System.ZLib.hpp
System.ZLib TZCompressionStream

Description

Writes compressed data to the destination output stream.

The Write method causes the data in the supplied buffer to be written to the output stream. buffer contains the raw (uncompressed) data to be written, and count contains the number of bytes to write.

The TZCompressionStream object caches data internally; data is flushed to the output stream when the cache becomes full, and when the object is destroyed (if pending data remains in the cache).

After data is written to the output stream, the OnProgress event is called. This gives you an opportunity to update a user interface control such as a progress indicator.

The result of the Write method is the number of bytes transferred from the buffer.

See Also