EncodingExtensions
public static MemoryOwner<byte> GetBytes(this Encoding encoding, ReadOnlySpan<char> chars, MemoryAllocator<byte> allocator = null)
public static MemoryOwner<char> GetChars(this Encoding encoding, ReadOnlySpan<byte> bytes, MemoryAllocator<char> allocator = null)