SpanEncoders.RawEncoder
Namespace: SnowBank.Data.Binary · struct
Implements: ISpanEncoder<Slice>, ISpanDecoder<Slice>, ISpanEncoder<byte[]>, ISpanDecoder<byte[]>, ISpanEncoder<ReadOnlyMemory<byte>>, ISpanDecoder<ReadOnlyMemory<byte>>, ISpanEncoder<MemoryStream>, ISpanDecoder<MemoryStream>, ISpanEncoder<ReadOnlySpan<byte>>
Encodes raw binary values (Slice, spans or arrays of bytes, ...)
Methods
TryDecode
static bool TryDecode(ReadOnlySpan<byte> source, out Slice value)
static bool TryDecode(ReadOnlySpan<byte> source, out ReadOnlyMemory<byte> value)
static bool TryDecode(ReadOnlySpan<byte> source, out byte[] value)
static bool TryDecode(ReadOnlySpan<byte> source, out MemoryStream value)
TryEncode
static bool TryEncode(Span<byte> destination, out int bytesWritten, in Slice value)
static bool TryEncode(Span<byte> destination, out int bytesWritten, in ReadOnlySpan<byte> value)
static bool TryEncode(Span<byte> destination, out int bytesWritten, in ReadOnlyMemory<byte> value)
static bool TryEncode(Span<byte> destination, out int bytesWritten, in byte[] value)
static bool TryEncode(Span<byte> destination, out int bytesWritten, in MemoryStream value)
TryGetSizeHint
static bool TryGetSizeHint(in Slice value, out int sizeHint)
static bool TryGetSizeHint(in ReadOnlySpan<byte> value, out int sizeHint)
static bool TryGetSizeHint(in ReadOnlyMemory<byte> value, out int sizeHint)
static bool TryGetSizeHint(in byte[] value, out int sizeHint)
static bool TryGetSizeHint(in MemoryStream value, out int sizeHint)
TryGetSpan
static bool TryGetSpan(in Slice value, out ReadOnlySpan<byte> span)
static bool TryGetSpan(in ReadOnlySpan<byte> value, out ReadOnlySpan<byte> span)
static bool TryGetSpan(in ReadOnlyMemory<byte> value, out ReadOnlySpan<byte> span)
static bool TryGetSpan(in byte[] value, out ReadOnlySpan<byte> span)
static bool TryGetSpan(in MemoryStream value, out ReadOnlySpan<byte> span)