3 writes to _state
System.IO.Compression (3)
System\IO\Compression\DeflateEncoder.cs (3)
77
_state
= ZLibNative.ZLibStreamHandle.CreateForDeflate(
97
_state
= ZLibNative.ZLibStreamHandle.CreateForDeflate(
129
_state
= null;
22 references to _state
System.IO.Compression (22)
System\IO\Compression\DeflateEncoder.cs (22)
128
_state
?.Dispose();
192
Debug.Assert(
_state
is not null);
219
_state
.NextIn = (IntPtr)inputPtr;
220
_state
.AvailIn = (uint)source.Length;
221
_state
.NextOut = (IntPtr)outputPtr;
222
_state
.AvailOut = (uint)destination.Length;
224
ZLibNative.ErrorCode errorCode =
_state
.Deflate(flushCode);
226
bytesConsumed = source.Length - (int)
_state
.AvailIn;
227
bytesWritten = destination.Length - (int)
_state
.AvailOut;
232
ZLibNative.ErrorCode.Ok =>
_state
.AvailIn == 0
236
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
239
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())
262
Debug.Assert(
_state
is not null);
275
_state
.NextIn = IntPtr.Zero;
276
_state
.AvailIn = 0;
277
_state
.NextOut = (IntPtr)outputPtr;
278
_state
.AvailOut = (uint)destination.Length;
280
ZLibNative.ErrorCode errorCode =
_state
.Deflate(ZLibNative.FlushCode.SyncFlush);
282
bytesWritten = destination.Length - (int)
_state
.AvailOut;
286
ZLibNative.ErrorCode.Ok =>
_state
.AvailOut == 0
290
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
293
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())