RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDecompressionStream.Read Method

Reads a block of data from the input stream, and decompresses it.

Pascal
function Read(var Buffer; Count: Longint): Longint; override;
C++
virtual __fastcall Longint Read( Buffer, Longint Count);

The Read method reads a block of data from the input stream, decompresses it, and stores it in the supplied buffer. 

The Buffer parameter is the destination for the decompressed data. 

Count is size of the destination buffer. The Read operation will end when the destination buffer is full, or when there are no more bytes available to be read from the input stream. 

After reading a block of data, the OnProgress event is fired by the object. This gives you a chance to update a user interface control such as a progress indicator during a long Read operation. 

The result of the Read operation is the number of decompressed bytes placed into the destination buffer. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!