DeflateStream Constructor (Stream, CompressionLevel, Boolean)
Initializes a new instance of the DeflateStream class by using the specified stream and compression level, and optionally leaves the stream open.
Assembly: System (in System.dll)
new : stream:Stream * compressionLevel:CompressionLevel * leaveOpen:bool -> DeflateStream
The stream to compress.
One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing the stream.
You use this constructor when you want to specify whether compression efficiency or speed is more important for an instance of the DeflateStream class, and whether to leave the stream object open after disposing the DeflateStream object.
This constructor overload uses the compression mode Compress. To set the compression mode to another value, use the DeflateStream(Stream, CompressionMode) or DeflateStream(Stream, CompressionMode, Boolean) overload.
Available since 8
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Available since 8.1