EncodingExtensions
Represents extension method for Encoding data type.
public static MemoryOwner<byte> GetBytes(this Encoding encoding, ReadOnlySpan<char> chars, MemoryAllocator<byte> allocator = null)
Encodes a set of characters from the specified read-only span.
public static MemoryOwner<char> GetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, MemoryAllocator<char> allocator = null)
Decodes all the bytes in the specified read-only byte.
Returns Encoding that doesn't generate BOM.