public ErrorCode Inflate(FlushCode flush) { EnsureNotDisposed(); EnsureState(State.InitializedForInflate); return(NativeZLibDLLStub.inflateDelegate(zStreamPtr, flush)); }
public ErrorCode Deflate(FlushCode flush) { EnsureNotDisposed(); EnsureState(State.InitializedForDeflate); return(NativeZLibDLLStub.deflateDelegate(ref zStream, flush)); }
public ErrorCode DeflateEnd() { EnsureNotDisposed(); EnsureState(State.InitializedForDeflate); ErrorCode errC; #if !FEATURE_NETCORE RuntimeHelpers.PrepareConstrainedRegions(); #endif try { } finally { errC = NativeZLibDLLStub.deflateEndDelegate(zStreamPtr); initializationState = State.Disposed; zlibLibraryHandle.DangerousRelease(); } return(errC); }
public ErrorCode InflateInit2_(int windowBits) { EnsureNotDisposed(); EnsureState(State.NotInitialized); ErrorCode errC; bool addRefSuccess = false; #if !FEATURE_NETCORE RuntimeHelpers.PrepareConstrainedRegions(); #endif try { } finally { errC = NativeZLibDLLStub.inflateInit2_Delegate(zStreamPtr, windowBits, ZLibVersion, sizeof(ZStream)); initializationState = State.InitializedForInflate; zlibLibraryHandle.DangerousAddRef(ref addRefSuccess); } Contract.Assert(addRefSuccess, "zlibLibraryHandle.DangerousAddRef in InflateInit2_ should always succeed, but it did not."); return(errC); }
public ErrorCode DeflateInit2_(CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy) { EnsureNotDisposed(); EnsureState(State.NotInitialized); ErrorCode errC; bool addRefSuccess = false; #if !FEATURE_NETCORE RuntimeHelpers.PrepareConstrainedRegions(); #endif try { } finally { errC = NativeZLibDLLStub.deflateInit2_Delegate(ref zStream, level, CompressionMethod.Deflated, windowBits, memLevel, strategy, ZLibVersion, Marshal.SizeOf(zStream)); initializationState = State.InitializedForDeflate; zlibLibraryHandle.DangerousAddRef(ref addRefSuccess); } Contract.Assert(addRefSuccess, "zlibLibraryHandle.DangerousAddRef in DeflateInit2_ should always succeed, but it did not."); return(errC); }
internal static Int32 ZLibCompileFlags() { return(NativeZLibDLLStub.zlibCompileFlagsDelegate()); }