Compressor Compressor Compressor Compressor Compressor Class

Definition

A compressor takes information written to a stream and compresses it using a compression algorithm.

public : sealed class Compressor : IClosable, ICompressor, IOutputStream
struct winrt::Windows::Storage::Compression::Compressor : IClosable, ICompressor, IOutputStream
public sealed class Compressor : IDisposable, ICompressor, IOutputStream
Public NotInheritable Class Compressor Implements IDisposable, ICompressor, IOutputStream
var compressor = new compressor(underlyingStream);
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

Compressor(IOutputStream) Compressor(IOutputStream) Compressor(IOutputStream) Compressor(IOutputStream) Compressor(IOutputStream)

Creates an instance of a compressor.

Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32)

Creates an instance of a compressor.

Methods

Close() Close() Close() Close() Close()

Closes a Compressor object and synchronously discards any information in buffers. This will close the underlying stream as well unless the Compressor.Detach method has been used to detach the stream from the object. Subsequent calls on a closed object, except for , will fail.

DetachStream() DetachStream() DetachStream() DetachStream() DetachStream()

Detaches the underlying stream from the Compressor object so that the object can be closed using the Compressor.Close method without also closing the underlying stream.

Dispose() Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

FinishAsync() FinishAsync() FinishAsync() FinishAsync() FinishAsync()

Finishes writing the compression stream.

FlushAsync() FlushAsync() FlushAsync() FlushAsync() FlushAsync()

Flushes the compression stream asynchronously.

WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer)

Writes information to the compression stream asynchronously.

See Also