Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteBase64Minimized() [1/3]

void System.Text.Json.Utf8JsonWriter.WriteBase64Minimized ( ReadOnlySpan< byte > bytes)
inlineprivate

Definition at line 4192 of file Utf8JsonWriter.cs.

4193 {
4195 int num = maxEncodedToUtf8Length + 3;
4196 if (_memory.Length - BytesPending < num)
4197 {
4198 Grow(num);
4199 }
4200 Span<byte> span = _memory.Span;
4201 if (_currentDepth < 0)
4202 {
4203 span[BytesPending++] = 44;
4204 }
4205 span[BytesPending++] = 34;
4207 span[BytesPending++] = 34;
4208 }
static int GetMaxEncodedToUtf8Length(int length)
Definition Base64.cs:502
void Grow(int requiredSize)
void Base64EncodeAndWrite(ReadOnlySpan< byte > bytes, Span< byte > output, int encodingLength)
unsafe Span< T > Span
Definition Memory.cs:28

References System.Text.Json.Utf8JsonWriter._currentDepth, System.Text.Json.Utf8JsonWriter._memory, System.Text.Json.Utf8JsonWriter.Base64EncodeAndWrite(), System.bytes, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Buffers.Text.Base64.GetMaxEncodedToUtf8Length(), System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, and System.Memory< T >.Span.