RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TZCompressionStream.Write Method

Writes compressed data to the destination output stream.

Pascal
function Write(const buffer; count: Longint): Longint; override;
C++
virtual __fastcall Longint Write(const  buffer, Longint count);

The Write method causes the data in the supplied buffer to be written 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 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!