DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.7.2" />

 Base64Decoder

public struct Base64Decoder
Represents base64 decoder suitable for decoding large base64-encoded binary data using streaming approach.
public bool NeedMoreData { get; }

Indicates that decoders expected additional data to decode.

public static IAsyncEnumerable<ReadOnlyMemory<byte>> DecodeFromUtf16Async(IAsyncEnumerable<ReadOnlyMemory<char>> chars, MemoryAllocator<byte> allocator = null, CancellationToken token = default)

Decodes a sequence of base64-encoded bytes.

public static IAsyncEnumerable<ReadOnlyMemory<byte>> DecodeFromUtf8Async(IAsyncEnumerable<ReadOnlyMemory<byte>> utf8Chars, MemoryAllocator<byte> allocator = null, CancellationToken token = default)

Decodes a sequence of base64-encoded bytes.

public void DecodeFromUtf16(ReadOnlySpan<char> chars, IBufferWriter<byte> output)

Decodes base64 characters.

public void DecodeFromUtf16(ref ReadOnlySequence chars, IBufferWriter<byte> output)

Decodes base64 characters.

public MemoryOwner<byte> DecodeFromUtf16(ReadOnlySpan<char> chars, MemoryAllocator<byte> allocator = null)

Decodes base64 characters.

public void DecodeFromUtf16<TConsumer>(ReadOnlySpan<char> chars, TConsumer output) where TConsumer : IReadOnlySpanConsumer<byte>

Decodes base64-encoded bytes.

public void DecodeFromUtf16<TArg>(ReadOnlySpan<char> chars, ReadOnlySpanAction<byte, TArg> callback, TArg arg)

Decodes base64-encoded bytes.

public void DecodeFromUtf16<TArg>(ReadOnlySpan<char> chars, method callback, TArg arg)

public void DecodeFromUtf8(ReadOnlySpan<byte> utf8Chars, IBufferWriter<byte> output)

Decodes UTF-8 encoded base64 string.

public void DecodeFromUtf8(ref ReadOnlySequence utf8Chars, IBufferWriter<byte> output)

Decodes UTF-8 encoded base64 string.

public MemoryOwner<byte> DecodeFromUtf8(ReadOnlySpan<byte> utf8Chars, MemoryAllocator<byte> allocator = null)

Decoes UTF-8 encoded base64 string.

public void DecodeFromUtf8<TConsumer>(ReadOnlySpan<byte> utf8Chars, TConsumer output) where TConsumer : IReadOnlySpanConsumer<byte>

Decodes base64-encoded bytes.

public void DecodeFromUtf8<TArg>(ReadOnlySpan<byte> utf8Chars, ReadOnlySpanAction<byte, TArg> output, TArg arg)

Decodes UTF-8 encoded base64 string.

public void DecodeFromUtf8<TArg>(ReadOnlySpan<byte> utf8Chars, method output, TArg arg)

public void DecodeFromUtf8(ReadOnlySpan<byte> utf8Chars, Stream output)

Decodes UTF-8 encoded base64 string and writes result to the stream synchronously.

public void Reset()

Resets the internal state of the decoder.