RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCompressionStream.Seek Method

Raises an exception of type ECompressionErrror.

Pascal
function Seek(Offset: Longint; Origin: Word): Longint; override;
C++
virtual __fastcall Longint Seek(Longint Offset, Word Origin);

A TCompressionStream is a write-only, sequential access data stream. Read operations are not permitted, and will raise an exception of type ECompressionError. Similarly, Seek operations will also raise an ECompressionError, with the message string "Invalid Stream Operation." 

However, you can call the Seek method with an offset of zero, and the Origin set to soFromCurrent. In this special case, the Seek method will return the number of raw (uncompressed) bytes that have been written to the stream so far. 

 

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