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();
197
Debug.Assert(
_state
is not null);
224
_state
.NextIn = (IntPtr)inputPtr;
225
_state
.AvailIn = (uint)source.Length;
226
_state
.NextOut = (IntPtr)outputPtr;
227
_state
.AvailOut = (uint)destination.Length;
229
ZLibNative.ErrorCode errorCode =
_state
.Deflate(flushCode);
231
bytesConsumed = source.Length - (int)
_state
.AvailIn;
232
bytesWritten = destination.Length - (int)
_state
.AvailOut;
237
ZLibNative.ErrorCode.Ok =>
_state
.AvailIn == 0
241
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
244
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())
267
Debug.Assert(
_state
is not null);
280
_state
.NextIn = IntPtr.Zero;
281
_state
.AvailIn = 0;
282
_state
.NextOut = (IntPtr)outputPtr;
283
_state
.AvailOut = (uint)destination.Length;
285
ZLibNative.ErrorCode errorCode =
_state
.Deflate(ZLibNative.FlushCode.SyncFlush);
287
bytesWritten = destination.Length - (int)
_state
.AvailOut;
291
ZLibNative.ErrorCode.Ok =>
_state
.AvailOut == 0
295
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
298
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())