ZlibStream Constructor (stream, mode, leaveOpen)

DotNetZip

Ionic Zip Library v1.9.1.6 ZlibStream Constructor (stream, mode, leaveOpen)
ReferenceIonic.ZlibZlibStreamZlibStream(Stream, CompressionMode, Boolean)
Create a ZlibStream using the specified CompressionMode, and explicitly specify whether the captive stream should be left open after Deflation or Inflation.
Declaration Syntax
C# Visual Basic Visual C++
public ZlibStream(
	Stream stream,
	CompressionMode mode,
	bool leaveOpen
)
Public Sub New ( _
	stream As Stream, _
	mode As CompressionMode, _
	leaveOpen As Boolean _
)
public:
ZlibStream(
	Stream^ stream, 
	CompressionMode mode, 
	bool leaveOpen
)
Parameters
stream (Stream)
The stream which will be read or written. This is called the "captive" stream in other places in this documentation.
mode (CompressionMode)
Indicates whether the ZlibStream will compress or decompress.
leaveOpen (Boolean)
true if the application would like the stream to remain open after inflation/deflation.
Remarks

When mode is CompressionMode.Compress, the ZlibStream will use the default compression level.

This constructor allows the application to request that the captive stream remain open after the deflation or inflation occurs. By default, after Close() is called on the stream, the captive stream is also closed. In some cases this is not desired, for example if the stream is a MemoryStream that will be re-read after compression. Specify true for the leaveOpen parameter to leave the stream open.

See the other overloads of this constructor for example code.

Assembly: Ionic.Zip (Module: Ionic.Zip) Version: 1.9.1.8 (1.9.1.8)