From RAD Studio API Documentation
Jump to: navigation, search


function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;


virtual __int64 __fastcall Seek(const __int64 Offset, System::Classes::TSeekOrigin Origin)/* overload */;
inline int __fastcall  Seek(int Offset, System::Word Origin){ return System::Classes::TStream::Seek(Offset, Origin); }


Type Visibility Source Unit Parent
function public
System.ZLib TZDecompressionStream


Resets the input stream, or moves the position forward.

A TZDecompressionStream is a read-only, unidirectional input stream. Write operations are not permitted, and will raise an exception of type ECompressionError. Seek operations can be used to move the stream position forward, but a Seek operation that attempts to move the position backwards will raise an ECompressionError exception, with the message string set to "Invalid Stream Operation."

You can call the Seek method with an offset of zero, and the origin set to soFromBeginning. This has the effect of resetting the input stream, effectively rewinding the stream back to the beginning.

Otherwise, the offset parameter must be a positive Int64 (a 64-bit signed integer type), and the origin parameter must be either soFromCurrent or soFromBeginning. This has the effect of moving the input stream position forward, decompressing data as it goes.

See Also