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 number of buffered bytes.
Indicates that the size of the encoded data is not a multiple of 3
and the encoder.
public static IAsyncEnumerable<ReadOnlyMemory<char>> EncodeToCharsAsync(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.
Encodes a block of bytes to base64-encoded characters.
public MemoryOwner<char> EncodeToChars(ReadOnlySpan<byte> bytes, MemoryAllocator<char> allocator = null, bool flush = false)
Encodes a block of bytes to base64-encoded characters.
public void EncodeToChars<TConsumer>(ReadOnlySpan<byte> bytes, TConsumer output, bool flush = false) where TConsumer : IReadOnlySpanConsumer<char>
Encodes a block of bytes to base64-encoded characters.
public void EncodeToChars<TArg>(ReadOnlySpan<byte> bytes, ReadOnlySpanAction<char, TArg> output, TArg arg, bool flush = false)
Encodes a block of bytes to base64-encoded characters.
public void EncodeToChars<TArg>(ReadOnlySpan<byte> bytes, method output, TArg arg, 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 UTF-8 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.
public void EncodeToUtf8<TConsumer>(ReadOnlySpan<byte> bytes, TConsumer output, bool flush = false) where TConsumer : IReadOnlySpanConsumer<byte>
Encodes a block of bytes to base64-encoded UTF-8 characters.
public void EncodeToUtf8<TArg>(ReadOnlySpan<byte> bytes, ReadOnlySpanAction<byte, TArg> output, TArg arg, bool flush = false)
Encodes a block of bytes to base64-encoded UTF-8 characters.
public void EncodeToUtf8<TArg>(ReadOnlySpan<byte> bytes, method output, TArg arg, bool flush = false)
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.
Gets the buffered data.
Resets the internal state of the encoder.