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

◆ CopyFrom()

int System.IO.Compression.OutputWindow.CopyFrom ( InputBuffer input,
int length )
inline

Definition at line 56 of file OutputWindow.cs.

57 {
58 length = Math.Min(Math.Min(length, 262144 - _bytesUsed), input.AvailableBytes);
59 int num = 262144 - _end;
60 int num2;
61 if (length > num)
62 {
63 num2 = input.CopyTo(_window, _end, num);
64 if (num2 == num)
65 {
66 num2 += input.CopyTo(_window, 0, length - num);
67 }
68 }
69 else
70 {
71 num2 = input.CopyTo(_window, _end, length);
72 }
73 _end = (_end + num2) & 0x3FFFF;
74 _bytesUsed += num2;
75 return num2;
76 }

References System.IO.Compression.OutputWindow._bytesUsed, System.IO.Compression.OutputWindow._end, System.IO.Compression.OutputWindow._window, System.input, System.length, and System.Math.Min().

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