Table of Contents

Method Decompress

Namespace
KZDev.PerfUtils
Assembly
KZDev.PerfUtils.dll

Decompress(Stream)

Decompresses the data in the source stream and returns a new MemoryStreamSlim instance containing the decompressed data.

public static MemoryStreamSlim Decompress(Stream source)

Parameters

source Stream

The source stream to decompress. This stream must be readable and seekable.

Returns

MemoryStreamSlim

A new MemoryStreamSlim instance containing the compressed data from the source stream using the specified decompression type. If the source stream is empty, an empty MemoryStreamSlim instance is returned.

Decompress(Stream, MemoryStreamSlimOptions)

Decompresses the data in the source stream and returns a new MemoryStreamSlim instance containing the decompressed data.

public static MemoryStreamSlim Decompress(Stream source, MemoryStreamSlimOptions decompressionStreamOptions)

Parameters

source Stream

The source stream to decompress. This stream must be readable and seekable.

decompressionStreamOptions MemoryStreamSlimOptions

The options used for creating the returned MemoryStreamSlim.

Returns

MemoryStreamSlim

A new MemoryStreamSlim instance containing the compressed data from the source stream using the specified decompression type. If the source stream is empty, an empty MemoryStreamSlim instance is returned.

Decompress(Stream, Func<MemoryStreamSlimOptions, MemoryStreamSlimOptions>)

Decompresses the data in the source stream and returns a new MemoryStreamSlim instance containing the decompressed data.

public static MemoryStreamSlim Decompress(Stream source, Func<MemoryStreamSlimOptions, MemoryStreamSlimOptions> optionsSetup)

Parameters

source Stream

The source stream to decompress. This stream must be readable and seekable.

optionsSetup Func<MemoryStreamSlimOptions, MemoryStreamSlimOptions>

Delegate to set up options to configure the decompression operation.

Returns

MemoryStreamSlim

A new MemoryStreamSlim instance containing the compressed data from the source stream using the specified decompression type. If the source stream is empty, an empty MemoryStreamSlim instance is returned.

Decompress<TState>(Stream, Func<MemoryStreamSlimOptions, TState, MemoryStreamSlimOptions>, TState)

Decompresses the data in the source stream and returns a new MemoryStreamSlim instance containing the decompressed data.

public static MemoryStreamSlim Decompress<TState>(Stream source, Func<MemoryStreamSlimOptions, TState, MemoryStreamSlimOptions> optionsSetup, TState setupState)

Parameters

source Stream

The source stream to decompress. This stream must be readable and seekable.

optionsSetup Func<MemoryStreamSlimOptions, TState, MemoryStreamSlimOptions>

Delegate to set up options to configure the decompression operation.

setupState TState

State object to pass to the options setup delegate. This can be used to pass any type of state information to the delegate and avoid the need for a closure.

Returns

MemoryStreamSlim

A new MemoryStreamSlim instance containing the compressed data from the source stream using the specified decompression type. If the source stream is empty, an empty MemoryStreamSlim instance is returned.

Type Parameters

TState