Base64Encoder
Represents base64 encoder suitable for encoding large binary
data using streaming approach.
Gets the maximum number of bytes that can be buffered by the encoder.
Gets the maximum size of the input block of bytes to encode.
Gets the buffered data.
Indicates that the size of the encoded data is not a multiple of 3
and this encoder expects input data.
public static IAsyncEnumerable<ReadOnlyMemory<char>> EncodeToUtf16Async(IAsyncEnumerable<ReadOnlyMemory<byte>> bytes, MemoryAllocator<char> allocator = null, CancellationToken token = default)
Encodes a sequence of bytes to characters using base64 encoding.
public static IAsyncEnumerable<ReadOnlyMemory<byte>> EncodeToUtf8Async(IAsyncEnumerable<ReadOnlyMemory<byte>> bytes, MemoryAllocator<byte> allocator = null, CancellationToken token = default)
Encodes a sequence of bytes to characters using base64 encoding.
public MemoryOwner<char> EncodeToUtf16(ReadOnlySpan<byte> bytes, MemoryAllocator<char> allocator = null, bool flush = false)
Encodes a block of bytes to base64-encoded characters.
Encodes a block of bytes to base64-encoded characters.
Encodes a block of bytes to base64-encoded characters.
public MemoryOwner<byte> EncodeToUtf8(ReadOnlySpan<byte> bytes, MemoryAllocator<byte> allocator = null, bool flush = false)
Encodes a block of bytes to base64-encoded UTF-8 characters.
Encodes a block of bytes to base64-encoded UTF-8 characters.
Encodes a block of bytes to base64-encoded UTF-8 characters.
Flushes the buffered data as base64-encoded characters to the output buffer.
Flushes the buffered data as base64-encoded UTF-8 characters to the output buffer.
Resets the internal state of the encoder.