Compressor Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A compressor takes information written to a stream and compresses it using a compression algorithm.
public ref class Compressor sealed : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.Storage.Compression.ICompressorFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Compressor final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Storage.Compression.ICompressorFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class Compressor final : IClosable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Storage.Compression.ICompressorFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Compressor : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Storage.Compression.ICompressorFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class Compressor : System.IDisposable
function Compressor(underlyingStream, algorithm, blockSize)
Public NotInheritable Class Compressor
Implements IDisposable
- Inheritance
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Compressor(IOutput |
Creates an instance of a compressor. |
Compressor(IOutput |
Creates an instance of a compressor. |
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. |
Detach |
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() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Finish |
Finishes writing the compression stream. |
Flush |
Flushes the compression stream asynchronously. |
Write |
Writes information to the compression stream asynchronously. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |