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, IOutputStreampublic sealed class Compressor : IDisposable, ICompressor, IOutputStreamPublic NotInheritable Class Compressor Implements IDisposable, ICompressor, IOutputStream// You can use this class in JavaScript.
- Attributes
| 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)
Creates an instance of a compressor.
public : Compressor(IOutputStream underlyingStream)public Compressor(IOutputStream underlyingStream)Public Sub New(underlyingStream As IOutputStream)// You can use this method in JavaScript.
- underlyingStream
- IOutputStream IOutputStream IOutputStream IOutputStream
The stream of compressed information to be written by the compressor.
- See Also
Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32) Compressor(IOutputStream, CompressAlgorithm, UInt32)
Creates an instance of a compressor.
public : Compressor(IOutputStream underlyingStream, CompressAlgorithm algorithm, unsigned int blockSize)public Compressor(IOutputStream underlyingStream, CompressAlgorithm algorithm, UInt32 blockSize)Public Sub New(underlyingStream As IOutputStream, algorithm As CompressAlgorithm, blockSize As UInt32)// You can use this method in JavaScript.
- underlyingStream
- IOutputStream IOutputStream IOutputStream IOutputStream
The stream of compressed information to be written by the compressor.
The compression algorithm used by the compressor to write underlyingStream.
- blockSize
- unsigned int UInt32 UInt32 UInt32
Size in bytes of the intermediate buffer used by the compression algorithm. A value of 0 specifies that the compression algorithm will use its default block size. Valid non-zero values for this parameter are 32Kb to 64Mb.
- See Also
Methods
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.
public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.
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.
public : IOutputStream DetachStream()public IOutputStream DetachStream()Public Function DetachStream() As IOutputStream// You can use this method in JavaScript.
The stream of information.
Dispose() Dispose() Dispose() Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()
FinishAsync() FinishAsync() FinishAsync() FinishAsync()
Finishes writing the compression stream.
public : IAsyncOperation<PlatForm::Boolean> FinishAsync()public IAsyncOperation<bool> FinishAsync()Public Function FinishAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
The asynchronous operation.
FlushAsync() FlushAsync() FlushAsync() FlushAsync()
Flushes the compression stream asynchronously.
public : IAsyncOperation<PlatForm::Boolean> FlushAsync()public IAsyncOperation<bool> FlushAsync()Public Function FlushAsync() As IAsyncOperation( Of bool )// You can use this method in JavaScript.
The asynchronous operation.
WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer) WriteAsync(IBuffer)
Writes information to the compression stream asynchronously.
public : IAsyncOperationWithProgress<unsigned int, unsigned int> WriteAsync(IBuffer buffer)public IAsyncOperationWithProgress<uint, uint> WriteAsync(IBuffer buffer)Public Function WriteAsync(buffer As IBuffer) As IAsyncOperationWithProgress( Of uint, uint )// You can use this method in JavaScript.
The buffer that contains the information to be written to the stream.
The asynchronous operation.