ZLibStream 构造函数

定义

重载

ZLibStream(Stream, CompressionLevel)

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

ZLibStream(Stream, CompressionMode)

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

ZLibStream(Stream, CompressionLevel, Boolean)

使用指定的流、压缩级别以及是否使 stream 保持打开状态,初始化 ZLibStream 类的新实例。

ZLibStream(Stream, CompressionMode, Boolean)

使用指定的流、压缩模式以及是否使 stream 保持打开状态,初始化 ZLibStream 类的新实例。

ZLibStream(Stream, ZLibCompressionOptions, Boolean)

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

ZLibStream(Stream, CompressionLevel)

Source:
ZLibStream.cs
Source:
ZLibStream.cs
Source:
ZLibStream.cs

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

public:
 ZLibStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionLevel compressionLevel);
public ZLibStream (System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel);
new System.IO.Compression.ZLibStream : System.IO.Stream * System.IO.Compression.CompressionLevel -> System.IO.Compression.ZLibStream
Public Sub New (stream As Stream, compressionLevel As CompressionLevel)

参数

stream
Stream

将压缩数据写入到的流。

compressionLevel
CompressionLevel

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

适用于

ZLibStream(Stream, CompressionMode)

Source:
ZLibStream.cs
Source:
ZLibStream.cs
Source:
ZLibStream.cs

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

public:
 ZLibStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionMode mode);
public ZLibStream (System.IO.Stream stream, System.IO.Compression.CompressionMode mode);
new System.IO.Compression.ZLibStream : System.IO.Stream * System.IO.Compression.CompressionMode -> System.IO.Compression.ZLibStream
Public Sub New (stream As Stream, mode As CompressionMode)

参数

stream
Stream

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

mode
CompressionMode

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

适用于

ZLibStream(Stream, CompressionLevel, Boolean)

Source:
ZLibStream.cs
Source:
ZLibStream.cs
Source:
ZLibStream.cs

使用指定的流、压缩级别以及是否使 stream 保持打开状态,初始化 ZLibStream 类的新实例。

public:
 ZLibStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionLevel compressionLevel, bool leaveOpen);
public ZLibStream (System.IO.Stream stream, System.IO.Compression.CompressionLevel compressionLevel, bool leaveOpen);
new System.IO.Compression.ZLibStream : System.IO.Stream * System.IO.Compression.CompressionLevel * bool -> System.IO.Compression.ZLibStream
Public Sub New (stream As Stream, compressionLevel As CompressionLevel, leaveOpen As Boolean)

参数

stream
Stream

将压缩数据写入到的流。

compressionLevel
CompressionLevel

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

leaveOpen
Boolean

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

适用于

ZLibStream(Stream, CompressionMode, Boolean)

Source:
ZLibStream.cs
Source:
ZLibStream.cs
Source:
ZLibStream.cs

使用指定的流、压缩模式以及是否使 stream 保持打开状态,初始化 ZLibStream 类的新实例。

public:
 ZLibStream(System::IO::Stream ^ stream, System::IO::Compression::CompressionMode mode, bool leaveOpen);
public ZLibStream (System.IO.Stream stream, System.IO.Compression.CompressionMode mode, bool leaveOpen);
new System.IO.Compression.ZLibStream : System.IO.Stream * System.IO.Compression.CompressionMode * bool -> System.IO.Compression.ZLibStream
Public Sub New (stream As Stream, mode As CompressionMode, leaveOpen As Boolean)

参数

stream
Stream

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

mode
CompressionMode

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

leaveOpen
Boolean

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

适用于

ZLibStream(Stream, ZLibCompressionOptions, Boolean)

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

public ZLibStream (System.IO.Stream stream, System.IO.Compression.ZLibCompressionOptions compressionOptions, bool leaveOpen = false);
new System.IO.Compression.ZLibStream : System.IO.Stream * System.IO.Compression.ZLibCompressionOptions * bool -> System.IO.Compression.ZLibStream
Public Sub New (stream As Stream, compressionOptions As ZLibCompressionOptions, Optional leaveOpen As Boolean = false)

参数

stream
Stream

将压缩数据写入到的流。

compressionOptions
ZLibCompressionOptions

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

leaveOpen
Boolean

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

例外

streamcompressionOptionsnull

适用于