BrotliStream Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
BrotliStream(Stream, CompressionLevel) |
Initializes a new instance of the BrotliStream class by using the specified stream and compression level. |
BrotliStream(Stream, CompressionMode) |
Initializes a new instance of the BrotliStream class by using the specified stream and compression mode. |
BrotliStream(Stream, BrotliCompressionOptions, Boolean) |
Initializes a new instance of the BrotliStream class by using the specified stream and compression options, and optionally leaves the stream open. |
BrotliStream(Stream, CompressionLevel, Boolean) |
Initializes a new instance of the BrotliStream class by using the specified stream and compression level, and optionally leaves the stream open. |
BrotliStream(Stream, CompressionMode, Boolean) |
Initializes a new instance of the BrotliStream class by using the specified stream and compression mode, and optionally leaves the stream open. |
BrotliStream(Stream, CompressionLevel)
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
Initializes a new instance of the BrotliStream class by using the specified stream and compression level.
public:
BrotliStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionLevel compressionLevel);
public BrotliStream (System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel);
new System.IO.Compression.BrotliStream : System.IO.Stream * System.IO.Compression.CompressionLevel -> System.IO.Compression.BrotliStream
Public Sub New (stream As Stream, compressionLevel As CompressionLevel)
Parameters
- stream
- Stream
The stream to which compressed data is written.
- compressionLevel
- CompressionLevel
One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing data to the stream.
Exceptions
stream
is null
.
.NET 7 and later: compressionLevel
is not defined in the CompressionLevel enumeration.
Applies to
BrotliStream(Stream, CompressionMode)
- Source:
- BrotliStream.cs
- Source:
- BrotliStream.cs
- Source:
- BrotliStream.cs
Initializes a new instance of the BrotliStream class by using the specified stream and compression mode.
public:
BrotliStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionMode mode);
public BrotliStream (System.IO.Stream stream, System.IO.Compression.CompressionMode mode);
new System.IO.Compression.BrotliStream : System.IO.Stream * System.IO.Compression.CompressionMode -> System.IO.Compression.BrotliStream
Public Sub New (stream As Stream, mode As CompressionMode)
Parameters
- stream
- Stream
The stream to which compressed data is written or from which data to decompress is read.
- mode
- CompressionMode
One of the enumeration values that indicates whether to compress data to the stream or decompress data from the stream.
Applies to
BrotliStream(Stream, BrotliCompressionOptions, Boolean)
Initializes a new instance of the BrotliStream class by using the specified stream and compression options, and optionally leaves the stream open.
public BrotliStream (System.IO.Stream stream, System.IO.Compression.BrotliCompressionOptions compressionOptions, bool leaveOpen = false);
new System.IO.Compression.BrotliStream : System.IO.Stream * System.IO.Compression.BrotliCompressionOptions * bool -> System.IO.Compression.BrotliStream
Public Sub New (stream As Stream, compressionOptions As BrotliCompressionOptions, Optional leaveOpen As Boolean = false)
Parameters
- stream
- Stream
The stream to which compressed data is written.
- compressionOptions
- BrotliCompressionOptions
The Brotli options for fine tuning the compression stream.
- leaveOpen
- Boolean
true
to leave the stream open after disposing the BrotliStream object; otherwise, false
.
Exceptions
stream
or compressionOptions
is null
.
Applies to
BrotliStream(Stream, CompressionLevel, Boolean)
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
- Source:
- BrotliStream.Compress.cs
Initializes a new instance of the BrotliStream class by using the specified stream and compression level, and optionally leaves the stream open.
public:
BrotliStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionLevel compressionLevel, bool leaveOpen);
public BrotliStream (System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen);
new System.IO.Compression.BrotliStream : System.IO.Stream * System.IO.Compression.CompressionLevel * bool -> System.IO.Compression.BrotliStream
Public Sub New (stream As Stream, compressionLevel As CompressionLevel, leaveOpen As Boolean)
Parameters
- stream
- Stream
The stream to which compressed data is written.
- compressionLevel
- CompressionLevel
One of the enumeration values that indicates whether to emphasize speed or compression efficiency when compressing data to the stream.
- leaveOpen
- Boolean
true
to leave the stream open after disposing the BrotliStream object; otherwise, false
.
Exceptions
stream
is null
.
.NET 7 and later: compressionLevel
is not defined in the CompressionLevel enumeration.
Applies to
BrotliStream(Stream, CompressionMode, Boolean)
- Source:
- BrotliStream.cs
- Source:
- BrotliStream.cs
- Source:
- BrotliStream.cs
Initializes a new instance of the BrotliStream class by using the specified stream and compression mode, and optionally leaves the stream open.
public:
BrotliStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionMode mode, bool leaveOpen);
public BrotliStream (System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen);
new System.IO.Compression.BrotliStream : System.IO.Stream * System.IO.Compression.CompressionMode * bool -> System.IO.Compression.BrotliStream
Public Sub New (stream As Stream, mode As CompressionMode, leaveOpen As Boolean)
Parameters
- stream
- Stream
The stream to which compressed data is written or from which data to decompress is read.
- mode
- CompressionMode
One of the enumeration values that indicates whether to compress data to the stream or decompress data from the stream.
- leaveOpen
- Boolean
true
to leave the stream open after the BrotliStream object is disposed; otherwise, false
.