Class BuiltinZLibInflater
A IZLibInflater implementation using the builtin System.IO.Compression implementation of zlib. Provides methods for inflating (decompressing) received data using per-connection zlib streams.
Inheritance
System.Object
BuiltinZLibInflater
Namespace: MarcusW.VncClient.Protocol.Implementation.Services.Communication
Assembly: MarcusW.VncClient.dll
Syntax
public sealed class BuiltinZLibInflater : object, IZLibInflater, IDisposable
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
ReadAndInflate(Stream, Int32, Int32, CancellationToken)
Reads sourceLength
bytes from the source
stream and returns a stream for inflating them.
Declaration
public Stream ReadAndInflate(Stream source, int sourceLength, int zlibStreamId = null, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | source | The stream to read the deflated bytes from. |
System.Int32 | sourceLength | The length of the deflated sector in the source stream. |
System.Int32 | zlibStreamId | The zlib stream to be used for inflating or |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Stream | The inflating stream. |
Remarks
For optimization reasons, this method must not be called again before the reading from the returned stream is over.
ResetZlibStream(Int32)
Resets the zlib stream for the given selector.
Declaration
public void ResetZlibStream(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The zlib stream to reset. |
Implements
IDisposable