DeflateStream(Stream, CompressionMode, Boolean) Constructor |
Initializes a new instance of the System.IO.Compression.DeflateStream class
using the specified stream and System.IO.Compression.CompressionMode value,
and a value that specifies whether to leave the stream open.
Namespace: Crestron.SimplSharp.CrestronIO.CompressionAssembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntaxpublic DeflateStream(
Stream stream,
CompressionMode mode,
bool leaveOpen
)
Parameters
- stream Stream
-
The stream to compress or decompress.
- mode CompressionMode
-
One of the System.IO.Compression.CompressionMode values that indicates the
action to take.
- leaveOpen Boolean
-
true to leave the stream open; otherwise, false.
Exceptions| Exception | Condition |
|---|
| ArgumentNullException |
stream is null.
|
| InvalidOperationException |
stream access right is ReadOnly and mode value is Compress.
|
| ArgumentException |
mode is not a valid System.IO.Compression.CompressionMode value.-or-System.IO.Compression.CompressionMode
is System.IO.Compression.CompressionMode.Compress and System.IO.Stream.CanWrite
is false.-or-System.IO.Compression.CompressionMode is System.IO.Compression.CompressionMode.Decompress
and System.IO.Stream.CanRead is false.
|
Version Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also