DeflateStream Constructor (stream, mode, leaveOpen)

DotNetZip

Ionic Zip Library v1.9.1.6 DeflateStream Constructor (stream, mode, leaveOpen)
ReferenceIonic.ZlibDeflateStreamDeflateStream(Stream, CompressionMode, Boolean)
Create a DeflateStream using the specified CompressionMode, and explicitly specify whether the stream should be left open after Deflation or Inflation.
Declaration Syntax
C# Visual Basic Visual C++
public DeflateStream(
	Stream stream,
	CompressionMode mode,
	bool leaveOpen
)
Public Sub New ( _
	stream As Stream, _
	mode As CompressionMode, _
	leaveOpen As Boolean _
)
public:
DeflateStream(
	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 DeflateStream will compress or decompress.
leaveOpen (Boolean)
true if the application would like the stream to remain open after inflation/deflation.
Remarks

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 memory stream that will be re-read after compression. Specify true for the leaveOpen parameter to leave the stream open.

The DeflateStream will use the default compression level.

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)