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