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

◆ InflateInit()

void System.IO.Compression.Inflater.InflateInit ( int windowBits)
inlineprivate

Definition at line 202 of file Inflater.cs.

203 {
204 ZLibNative.ErrorCode errorCode;
205 try
206 {
207 errorCode = ZLibNative.CreateZLibStreamForInflate(out _zlibStream, windowBits);
208 }
209 catch (Exception innerException)
210 {
211 throw new ZLibException(System.SR.ZLibErrorDLLLoadError, innerException);
212 }
213 switch (errorCode)
214 {
215 case ZLibNative.ErrorCode.Ok:
216 break;
217 case ZLibNative.ErrorCode.MemError:
218 throw new ZLibException(System.SR.ZLibErrorNotEnoughMemory, "inflateInit2_", (int)errorCode, _zlibStream.GetErrorMessage());
219 case ZLibNative.ErrorCode.VersionError:
220 throw new ZLibException(System.SR.ZLibErrorVersionMismatch, "inflateInit2_", (int)errorCode, _zlibStream.GetErrorMessage());
221 case ZLibNative.ErrorCode.StreamError:
222 throw new ZLibException(System.SR.ZLibErrorIncorrectInitParameters, "inflateInit2_", (int)errorCode, _zlibStream.GetErrorMessage());
223 default:
224 throw new ZLibException(System.SR.ZLibErrorUnexpected, "inflateInit2_", (int)errorCode, _zlibStream.GetErrorMessage());
225 }
226 }
ZLibNative.ZLibStreamHandle _zlibStream
Definition Inflater.cs:15
static string ZLibErrorNotEnoughMemory
Definition SR.cs:46
static string ZLibErrorVersionMismatch
Definition SR.cs:48
static string ZLibErrorDLLLoadError
Definition SR.cs:40
static string ZLibErrorUnexpected
Definition SR.cs:50
static string ZLibErrorIncorrectInitParameters
Definition SR.cs:44
Definition SR.cs:7

References System.IO.Compression.Inflater._zlibStream, System.IO.Compression.ZLibNative.CreateZLibStreamForInflate(), System.SR.ZLibErrorDLLLoadError, System.SR.ZLibErrorIncorrectInitParameters, System.SR.ZLibErrorNotEnoughMemory, System.SR.ZLibErrorUnexpected, and System.SR.ZLibErrorVersionMismatch.

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