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

◆ CopyTo()

int System.IO.Compression.OutputWindow.CopyTo ( Span< byte > output)
inline

Definition at line 78 of file OutputWindow.cs.

79 {
80 int num;
81 if (output.Length > _bytesUsed)
82 {
83 num = _end;
84 output = output.Slice(0, _bytesUsed);
85 }
86 else
87 {
88 num = (_end - _bytesUsed + output.Length) & 0x3FFFF;
89 }
90 int length = output.Length;
91 int num2 = output.Length - num;
92 if (num2 > 0)
93 {
94 _window.AsSpan(262144 - num2, num2).CopyTo(output);
95 output = output.Slice(num2, num);
96 }
97 _window.AsSpan(num - output.Length, output.Length).CopyTo(output);
99 return length;
100 }
Span< T > Slice(int start)
Definition Span.cs:271
int Length
Definition Span.cs:70

References System.IO.Compression.OutputWindow._bytesUsed, System.IO.Compression.OutputWindow._end, System.IO.Compression.OutputWindow._window, System.length, System.Span< T >.Length, and System.Span< T >.Slice().

Referenced by System.IO.Compression.InflaterManaged.Inflate().