75 references to ErrorCode
System.IO.Compression (75)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (8)
7internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode DeflateInit2_(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.CompressionLevel level, global::System.IO.Compression.ZLibNative.CompressionMethod method, int windowBits, int memLevel, global::System.IO.Compression.ZLibNative.CompressionStrategy strategy); 15internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode Deflate(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.FlushCode flush); 23internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode DeflateEnd(global::System.IO.Compression.ZLibNative.ZStream* stream); 31internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode DeflateReset(global::System.IO.Compression.ZLibNative.ZStream* stream); 39internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateInit2_(global::System.IO.Compression.ZLibNative.ZStream* stream, int windowBits); 47internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateReset2_(global::System.IO.Compression.ZLibNative.ZStream* stream, int windowBits); 55internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode Inflate(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.FlushCode flush); 63internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateEnd(global::System.IO.Compression.ZLibNative.ZStream* stream);
src\runtime\src\libraries\Common\src\Interop\Interop.zlib.cs (8)
12internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_( 21internal static unsafe partial ZLibNative.ErrorCode Deflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush); 24internal static unsafe partial ZLibNative.ErrorCode DeflateEnd(ZLibNative.ZStream* stream); 27internal static unsafe partial ZLibNative.ErrorCode DeflateReset(ZLibNative.ZStream* stream); 30internal static unsafe partial ZLibNative.ErrorCode InflateInit2_(ZLibNative.ZStream* stream, int windowBits); 33internal static unsafe partial ZLibNative.ErrorCode InflateReset2_(ZLibNative.ZStream* stream, int windowBits); 36internal static unsafe partial ZLibNative.ErrorCode Inflate(ZLibNative.ZStream* stream, ZLibNative.FlushCode flush); 39internal static unsafe partial ZLibNative.ErrorCode InflateEnd(ZLibNative.ZStream* stream);
src\runtime\src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (17)
231State.InitializedForDeflate => (DeflateEnd() == ErrorCode.Ok), 232State.InitializedForInflate => (InflateEnd() == ErrorCode.Ok), 267private void EnsureNativeHandleInitialized(ErrorCode zlibErrorCode, string zlibErrorContext) 271if (zlibErrorCode is not ErrorCode.Ok) 277ErrorCode.MemError => SR.ZLibErrorNotEnoughMemory, 280ErrorCode.VersionError => SR.ZLibErrorVersionMismatch, 283ErrorCode.StreamError => SR.ZLibErrorIncorrectInitParameters, 296ErrorCode errC; 314public unsafe ErrorCode Deflate(FlushCode flush) 336public unsafe ErrorCode DeflateReset() 358private unsafe ErrorCode DeflateEnd() 364ErrorCode errC = Interop.ZLib.DeflateEnd(stream); 375ErrorCode errC; 393public unsafe ErrorCode InflateReset2_(int windowBits) 415public unsafe ErrorCode Inflate(FlushCode flush) 437private unsafe ErrorCode InflateEnd() 443ErrorCode errC = Interop.ZLib.InflateEnd(stream);
System\IO\Compression\DeflateDecoder.cs (5)
87ZLibNative.ErrorCode errorCode = _state.Inflate(ZLibNative.FlushCode.NoFlush); 94ZLibNative.ErrorCode.Ok or ZLibNative.ErrorCode.BufError => _state.AvailOut == 0 97ZLibNative.ErrorCode.StreamEnd => OperationStatus.Done, 102if (errorCode == ZLibNative.ErrorCode.StreamEnd)
System\IO\Compression\DeflateEncoder.cs (10)
210ZLibNative.ErrorCode errorCode = _state.Deflate(flushCode); 217ZLibNative.ErrorCode.Ok when isFinalBlock => OperationStatus.DestinationTooSmall, 218ZLibNative.ErrorCode.Ok => _state.AvailIn == 0 221ZLibNative.ErrorCode.StreamEnd => OperationStatus.Done, 222ZLibNative.ErrorCode.BufError => _state.AvailOut == 0 229if (isFinalBlock && errorCode == ZLibNative.ErrorCode.StreamEnd) 266ZLibNative.ErrorCode errorCode = _state.Deflate(ZLibNative.FlushCode.SyncFlush); 272ZLibNative.ErrorCode.Ok => _state.AvailOut == 0 275ZLibNative.ErrorCode.StreamEnd => OperationStatus.Done, 276ZLibNative.ErrorCode.BufError => _state.AvailOut == 0
System\IO\Compression\DeflateZLib\Deflater.cs (12)
7using ZErrorCode = System.IO.Compression.ZLibNative.ErrorCode; 111private unsafe ZErrorCode ReadDeflateOutput(byte[] outputBuffer, ZFlushCode flushCode, out int bytesRead) 122ZErrorCode errC = Deflate(flushCode); 135ZErrorCode errC = ReadDeflateOutput(outputBuffer, ZFlushCode.Finish, out bytesRead); 136return errC == ZErrorCode.StreamEnd; 153return ReadDeflateOutput(outputBuffer, ZFlushCode.SyncFlush, out bytesRead) == ZErrorCode.Ok; 196private ZErrorCode Deflate(ZFlushCode flushCode) 198ZErrorCode errC; 210case ZErrorCode.Ok: 211case ZErrorCode.StreamEnd: 214case ZErrorCode.BufError: 217case ZErrorCode.StreamError:
System\IO\Compression\DeflateZLib\Inflater.cs (11)
129if (ReadInflateOutput(bufPtr, length, ZLibNative.FlushCode.NoFlush, out bytesRead) == ZLibNative.ErrorCode.StreamEnd) 280private unsafe ZLibNative.ErrorCode ReadInflateOutput(byte* bufPtr, int length, ZLibNative.FlushCode flushCode, out int bytesRead) 287ZLibNative.ErrorCode errC = Inflate(flushCode); 297private ZLibNative.ErrorCode Inflate(ZLibNative.FlushCode flushCode) 299ZLibNative.ErrorCode errC; 310case ZLibNative.ErrorCode.Ok: // progress has been made inflating 311case ZLibNative.ErrorCode.StreamEnd: // The end of the input stream has been reached 314case ZLibNative.ErrorCode.BufError: // No room in the output buffer - inflate() can be called again with more space to continue 317case ZLibNative.ErrorCode.MemError: // Not enough memory to complete the operation 320case ZLibNative.ErrorCode.DataError: // The input data was corrupted (input stream not conforming to the zlib format or incorrect check value) 323case ZLibNative.ErrorCode.StreamError: //the stream structure was inconsistent (for example if next_in or next_out was NULL),
System\IO\Compression\DeflateZLib\ZLibException.cs (4)
18private readonly ZLibNative.ErrorCode _zlibErrorCode = ZLibNative.ErrorCode.Ok; 31_zlibErrorCode = (ZLibNative.ErrorCode)zlibErrorCode; 61_zlibErrorCode = (ZLibNative.ErrorCode)info.GetInt32("zlibErrorCode");