DotNext by .NET Foundation and Contributors

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

 Base64Decoder

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

Indicates that the decoder expects 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> bytes)

Decodes base64 characters.

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

Decodes base64 characters.

public void DecodeFromUtf16(ReadOnlySpan<char> chars, ref BufferWriterSlim bytes)

Decodes UTF-8 encoded base64 string.

public void DecodeFromUtf8(ReadOnlySpan<byte> chars, IBufferWriter<byte> bytes)

Decodes UTF-8 encoded base64 string.

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

Decoes UTF-8 encoded base64 string.

public void DecodeFromUtf8(ReadOnlySpan<byte> chars, ref BufferWriterSlim bytes)

Decodes UTF-8 encoded base64 string.

public void Reset()

Resets the internal state of the decoder.