Topic Path: Symbol Reference > Classes > TIdCompressionIntercept Class > TIdCompressionIntercept Methods > Receive Method
ContentsIndexHome
PreviousUpNext
TIdCompressionIntercept.Receive Method

Decompresses stream data for the intercept using ZLib.

procedure Receive(
    var VBuffer: TIdBytes
); override;
Parameters 
Description 
ABuffer 
Stream to use for input and output values for the operation. 

Receive is an overridden procedure in TIdCompressionIntercept that implements ZLib decompression of data received in ABuffer. When CompressionLevel is 0 (zero), the compression intercept is dormant and no decompression is performed for values in ABuffer. 

Receive initializes the internal ZLib compression and decompression records when they have been assigned in the object instance. Receive reads data from the internal receive buffer using a 2,048 byte block that expands by 1024 bytes on successive reads until the end of the ZLib stream is reached. If a stream, data, or memory error occurs while decompressing the contents of the receive buffer, a EIdDecompressionError exception will be raised with the message RSZLDecompressionError

On successful completion of receive buffer decompression, ABuffer is resized and the decompressed data is returned to the stream.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.