BrotliStream 构造函数

定义

重载

BrotliStream(Stream, CompressionLevel)

使用指定的流和压缩级别初始化 BrotliStream 类的新实例。

BrotliStream(Stream, CompressionMode)

使用指定的流和压缩模式初始化 BrotliStream 类的新实例。

BrotliStream(Stream, BrotliCompressionOptions, Boolean)

使用指定的流和压缩选项初始化 BrotliStream 类的新实例,并选择性地将流保持打开状态。

BrotliStream(Stream, CompressionLevel, Boolean)

使用指定的流和压缩级别初始化 BrotliStream 类的新实例,并选择性地将流保持打开状态。

BrotliStream(Stream, CompressionMode, Boolean)

使用指定的流和压缩模式初始化 BrotliStream 类的新实例,并选择性地使流保持打开状态。

BrotliStream(Stream, CompressionLevel)

Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs

使用指定的流和压缩级别初始化 BrotliStream 类的新实例。

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)

参数

stream
Stream

将压缩数据写入到的流。

compressionLevel
CompressionLevel

枚举值之一,指示在将数据压缩到流时是强调速度还是压缩效率。

例外

.NET 7 及更高版本:compressionLevel 未在 CompressionLevel 枚举中定义。

stream null

适用于

BrotliStream(Stream, CompressionMode)

Source:
BrotliStream.cs
Source:
BrotliStream.cs
Source:
BrotliStream.cs

使用指定的流和压缩模式初始化 BrotliStream 类的新实例。

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)

参数

stream
Stream

写入压缩数据的流或从中读取要解压缩的数据的流。

mode
CompressionMode

枚举值之一,指示是将数据压缩到流还是从流解压缩数据。

适用于

BrotliStream(Stream, BrotliCompressionOptions, Boolean)

使用指定的流和压缩选项初始化 BrotliStream 类的新实例,并选择性地将流保持打开状态。

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)

参数

stream
Stream

将压缩数据写入到的流。

compressionOptions
BrotliCompressionOptions

用于微调压缩流的 Brotli 选项。

leaveOpen
Boolean

true 释放 BrotliStream 对象后使流保持打开状态;否则,false

例外

streamcompressionOptionsnull

适用于

BrotliStream(Stream, CompressionLevel, Boolean)

Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs
Source:
BrotliStream.Compress.cs

使用指定的流和压缩级别初始化 BrotliStream 类的新实例,并选择性地将流保持打开状态。

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)

参数

stream
Stream

将压缩数据写入到的流。

compressionLevel
CompressionLevel

枚举值之一,指示在将数据压缩到流时是强调速度还是压缩效率。

leaveOpen
Boolean

true 释放 BrotliStream 对象后使流保持打开状态;否则,false

例外

.NET 7 及更高版本:compressionLevel 未在 CompressionLevel 枚举中定义。

stream null

适用于

BrotliStream(Stream, CompressionMode, Boolean)

Source:
BrotliStream.cs
Source:
BrotliStream.cs
Source:
BrotliStream.cs

使用指定的流和压缩模式初始化 BrotliStream 类的新实例,并选择性地使流保持打开状态。

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)

参数

stream
Stream

写入压缩数据的流或从中读取要解压缩的数据的流。

mode
CompressionMode

枚举值之一,指示是将数据压缩到流还是从流解压缩数据。

leaveOpen
Boolean

true 释放 BrotliStream 对象后使流保持打开状态;否则,false

适用于