Base64.DecodeFromUtf8 方法

定義

多載

名稱 Description
DecodeFromUtf8(ReadOnlySpan<Byte>)
DecodeFromUtf8(ReadOnlySpan<Byte>, Span<Byte>)
DecodeFromUtf8(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Boolean)

將以 64 進位表示的 UTF-8 編碼文字範圍解碼為二進位資料。 如果輸入不是 4 的倍數,它會盡可能解碼到最接近 4 的倍數。

DecodeFromUtf8(ReadOnlySpan<Byte>)

來源:
Base64Decoder.cs
public:
 static cli::array <System::Byte> ^ DecodeFromUtf8(ReadOnlySpan<System::Byte> source);
public static byte[] DecodeFromUtf8(ReadOnlySpan<byte> source);
static member DecodeFromUtf8 : ReadOnlySpan<byte> -> byte[]
Public Shared Function DecodeFromUtf8 (source As ReadOnlySpan(Of Byte)) As Byte()

參數

source
ReadOnlySpan<Byte>

傳回

Byte[]

適用於

DecodeFromUtf8(ReadOnlySpan<Byte>, Span<Byte>)

來源:
Base64Decoder.cs
public:
 static int DecodeFromUtf8(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination);
public static int DecodeFromUtf8(ReadOnlySpan<byte> source, Span<byte> destination);
static member DecodeFromUtf8 : ReadOnlySpan<byte> * Span<byte> -> int
Public Shared Function DecodeFromUtf8 (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte)) As Integer

參數

source
ReadOnlySpan<Byte>
destination
Span<Byte>

傳回

適用於

DecodeFromUtf8(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Boolean)

來源:
Base64Decoder.cs
來源:
Base64Decoder.cs
來源:
Base64Decoder.cs
來源:
Base64Decoder.cs
來源:
Base64Decoder.cs

將以 64 進位表示的 UTF-8 編碼文字範圍解碼為二進位資料。 如果輸入不是 4 的倍數,它會盡可能解碼到最接近 4 的倍數。

public static System.Buffers.OperationStatus DecodeFromUtf8(ReadOnlySpan<byte> utf8, Span<byte> bytes, out int bytesConsumed, out int bytesWritten, bool isFinalBlock = true);
static member DecodeFromUtf8 : ReadOnlySpan<byte> * Span<byte> * int * int * bool -> System.Buffers.OperationStatus
Public Shared Function DecodeFromUtf8 (utf8 As ReadOnlySpan(Of Byte), bytes As Span(Of Byte), ByRef bytesConsumed As Integer, ByRef bytesWritten As Integer, Optional isFinalBlock As Boolean = true) As OperationStatus

參數

utf8
ReadOnlySpan<Byte>

輸入區間包含 UTF-8 編碼的 64 進位文字,需要解碼。

bytes
Span<Byte>

輸出範圍包含操作結果,也就是解碼後的二進位資料。

bytesConsumed
Int32

當此方法回傳時,包含操作過程中消耗的輸入位元組數。 若有需要,這可以用來切片後續呼叫的輸入。

bytesWritten
Int32

當此方法回傳時,包含寫入輸出區間的位元組數。 若有需要,這可用來切片後續呼叫的輸出。

isFinalBlock
Boolean

true (預設值)表示輸入區間包含整個待解碼的資料。 false 表示輸入區間包含部分資料,後續會有更多資料。

傳回

這是表示解碼操作狀態的列舉值之一。

備註

回傳值可為如下:

適用於