Interface IZLibInflater
Provides methods for inflating (decompressing) received data using per-connection zlib streams.
Namespace: MarcusW.VncClient.Protocol.Services
Assembly: MarcusW.VncClient.dll
Syntax
public interface IZLibInflater : IDisposable
Remarks
It's not necessary that implementations of this interface are thread-safe because the processing of received frames always happens synchronously in a single thread. Because of this, calls to methods of such implementations should never come from multiple threads.
Methods
| Improve this Doc View SourceReadAndInflate(Stream, Int32, Int32, CancellationToken)
Reads sourceLength
bytes from the source
stream and returns a stream for inflating them.
Declaration
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
void ResetZlibStream(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The zlib stream to reset. |