System.ZLib.TZCompressionStream.Seek

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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); }

Properties

Type Visibility Source Unit Parent
function public
System.ZLib.pas
System.ZLib.hpp
System.ZLib TZCompressionStream

Description

Raises an exception of type ECompressionErrror.

A TZCompressionStream 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 returns the number of raw (uncompressed) bytes that have been written to the stream so far.

See Also