Interface IDecoder
Represents decoder.
Namespace: OnixS.SimpleBinaryEncoding
Assembly: OnixS.SimpleBinaryEncoding.dll
Syntax
public interface IDecoder
Methods
Wrap(MemoryPointer<Byte>)
Creates a new message object and wraps it around the data buffer.
Declaration
IMessage Wrap(MemoryPointer<byte> data)
Parameters
Type | Name | Description |
---|---|---|
MemoryPointer<System.Byte> | data | Pointer to buffer. |
Returns
Type | Description |
---|---|
IMessage | Decoded message. |
WrapPreCreatedMessage(MemoryPointer<Byte>)
Wraps pre-created message object around the data buffer.
Declaration
IMessage WrapPreCreatedMessage(MemoryPointer<byte> data)
Parameters
Type | Name | Description |
---|---|---|
MemoryPointer<System.Byte> | data | Pointer to buffer. |
Returns
Type | Description |
---|---|
IMessage | Decoded message. |
WrapPreCreatedMessageWithoutFramingHeader(ReadOnlySpan<Byte>)
Wraps pre-created message object around the data buffer. NOTE: This method will create a new pinned buffer for the message with framing header and copy data into it, so it is slow.
Declaration
IMessage WrapPreCreatedMessageWithoutFramingHeader(ReadOnlySpan<byte> data)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<System.Byte> | data | Pointer to buffer, which contains the message without framing header. |
Returns
Type | Description |
---|---|
IMessage | Decoded message. |
WrapWithoutFramingHeader(ReadOnlySpan<Byte>)
Creates a new message object and wraps it around the data buffer. NOTE: This method will create a new pinned buffer for the message with framing header and copy data into it, so it is slow.
Declaration
IMessage WrapWithoutFramingHeader(ReadOnlySpan<byte> data)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<System.Byte> | data | Pointer to buffer, which contains the message without framing header. |
Returns
Type | Description |
---|---|
IMessage | Decoded message. |