Skip to main content
Compressor class

Applies to Windows and Windows Phone

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

Syntax


var compressor = new Windows.Storage.Compression.Compressor(iOutputStream);
var compressor = new Windows.Storage.Compression.Compressor(iOutputStream, compressAlgorithm, uInt32);

public sealed class Compressor : IOutputStream,
    IDisposable

Public NotInheritable Class Compressor
    Implements IOutputStream, _
    IDisposable

public ref class Compressor sealed : IOutputStream,
    IClosable

Attributes

[ DualApiPartition()]
[ MarshalingBehavior(Agile)]
[ Version(0x06020000)]

Members

The Compressor class has these types of members:

Constructors

The Compressor class has these constructors.

ConstructorDescription
Compressor(IOutputStream) Creates an instance of a compressor.
Compressor(IOutputStream, CompressAlgorithm, UInt32) Creates an instance of a compressor.

 

Methods

The Compressor class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Close [C++, JavaScript]Closes a Compressor object and synchronously discards any information in buffers.
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 [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
FinishAsync Finishes writing the compression stream.
FlushAsync Flushes the compression stream asynchronously.
WriteAsync Writes information to the compression stream asynchronously.

 

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Storage.Compression
Windows::Storage::Compression [C++]

Metadata

Windows.winmd

See also

IOutputStream
IClosable