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;
24 references to _state
System.IO.Compression (24)
System\IO\Compression\DeflateEncoder.cs (24)
128
_state
?.Dispose();
178
Debug.Assert(
_state
is not null);
205
_state
.NextIn = (IntPtr)inputPtr;
206
_state
.AvailIn = (uint)source.Length;
207
_state
.NextOut = (IntPtr)outputPtr;
208
_state
.AvailOut = (uint)destination.Length;
210
ZLibNative.ErrorCode errorCode =
_state
.Deflate(flushCode);
212
bytesConsumed = source.Length - (int)
_state
.AvailIn;
213
bytesWritten = destination.Length - (int)
_state
.AvailOut;
218
ZLibNative.ErrorCode.Ok =>
_state
.AvailIn == 0
222
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
225
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())
248
Debug.Assert(
_state
is not null);
261
_state
.NextIn = IntPtr.Zero;
262
_state
.AvailIn = 0;
263
_state
.NextOut = (IntPtr)outputPtr;
264
_state
.AvailOut = (uint)destination.Length;
266
ZLibNative.ErrorCode errorCode =
_state
.Deflate(ZLibNative.FlushCode.SyncFlush);
268
bytesWritten = destination.Length - (int)
_state
.AvailOut;
272
ZLibNative.ErrorCode.Ok =>
_state
.AvailOut == 0
276
ZLibNative.ErrorCode.BufError =>
_state
.AvailOut == 0
279
_ => throw new ZLibException(SR.ZLibErrorUnexpected, "deflate", (int)errorCode,
_state
.GetErrorMessage())
295
Debug.Assert(
_state
is not null);
297
_state
.DeflateReset();