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

◆ InflateVerified()

unsafe int System.IO.Compression.Inflater.InflateVerified ( byte * bufPtr,
int length )
inline

Definition at line 74 of file Inflater.cs.

75 {
76 try
77 {
78 int bytesRead = 0;
79 if (_uncompressedSize == -1)
80 {
81 ReadOutput(bufPtr, length, out bytesRead);
82 }
84 {
86 ReadOutput(bufPtr, length, out bytesRead);
87 _currentInflatedCount += bytesRead;
88 }
89 else
90 {
91 _finished = true;
92 _zlibStream.AvailIn = 0u;
93 }
94 return bytesRead;
95 }
96 finally
97 {
98 if (_zlibStream.AvailIn == 0 && IsInputBufferHandleAllocated)
99 {
101 }
102 }
103 }
unsafe void ReadOutput(byte *bufPtr, int length, out int bytesRead)
Definition Inflater.cs:105
readonly long _uncompressedSize
Definition Inflater.cs:19
ZLibNative.ZLibStreamHandle _zlibStream
Definition Inflater.cs:15
unsafe bool IsInputBufferHandleAllocated
Definition Inflater.cs:25

References System.IO.Compression.Inflater._currentInflatedCount, System.IO.Compression.Inflater._finished, System.IO.Compression.Inflater._uncompressedSize, System.IO.Compression.Inflater._zlibStream, System.IO.Compression.Inflater.DeallocateInputBufferHandle(), System.IO.Compression.Inflater.IsInputBufferHandleAllocated, System.length, System.Math.Min(), and System.IO.Compression.Inflater.ReadOutput().

Referenced by System.IO.Compression.Inflater.Inflate(), System.IO.Compression.Inflater.Inflate(), and System.IO.Compression.Inflater.Inflate().