From RAD Studio API Documentation
Jump to: navigation, search


constructor Create(source: TStream); overload;
constructor Create(source: TStream; WindowBits: Integer); overload;
constructor Create(source: TStream; WindowBits: Integer; OwnsStream: Boolean); overload;


__fastcall TZDecompressionStream(System::Classes::TStream* source)/* overload */;
__fastcall TZDecompressionStream(System::Classes::TStream* source, int WindowBits)/* overload */;
__fastcall TZDecompressionStream(System::Classes::TStream* source, int WindowBits, bool OwnsStream)/* overload */;


Type Visibility Source Unit Parent
constructor public
System.ZLib TZDecompressionStream


Creates and initializes an instance of a TZDecompressionStream object.

The Source parameter is the source input stream, which was previously created with a TZCompressionStream object. Subsequent Read operations will read data from the Source stream, and decompress the data on the fly.

The OwnsStream parameter determines whether the TZDecompressionStream class owns the Source stream or not. If OwnsStream is True, the Source stream is freed on Destroy. Default value is False.

The WindowBits parameter determines the buffer handling. Zero indicates the zlib header to determine the buffer size. Values between 8 and 15 set the buffer size, negative values indicate the raw processing, and adding to 16 forces the gzip handling.

Note: When decompressing files, adding to 32 indicates the automatic header detection of zlib or gzip formats. See the Advanced functions section of the zlib Manual for specific information.

Code Examples