System.ZLib.TZCompressionStream.Write
Delphi
function Write(const buffer; count: Longint): Longint; override;
C++
virtual System::LongInt __fastcall Write(const void *buffer, System::LongInt count)/* overload */;
inline System::LongInt __fastcall Write(const System::Sysutils::TBytes Buffer, System::LongInt Offset, System::LongInt Count){ return System::Classes::TStream::Write(Buffer, Offset, Count); }
inline System::LongInt __fastcall Write(const System::Sysutils::TBytes Buffer, System::LongInt 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.