Пример #1
0
            public ErrorCode Inflate(FlushCode flush)
            {
                EnsureNotDisposed();
                EnsureState(State.InitializedForInflate);

                return(ZLibInterop.Inflate(ref _zStream, flush));
            }
Пример #2
0
            public ErrorCode InflateEnd()
            {
                EnsureNotDisposed();
                EnsureState(State.InitializedForInflate);

                ErrorCode errC = ZLibInterop.InflateEnd(ref _zStream);

                _initializationState = State.Disposed;

                return(errC);
            }
Пример #3
0
            public ErrorCode InflateInit2_(Int32 windowBits)
            {
                EnsureNotDisposed();
                EnsureState(State.NotInitialized);

                ErrorCode errC = ZLibInterop.InflateInit2_(ref _zStream, windowBits);

                _initializationState = State.InitializedForInflate;

                return(errC);
            }
Пример #4
0
            public ErrorCode DeflateInit2_(CompressionLevel level, Int32 windowBits, Int32 memLevel, CompressionStrategy strategy)
            {
                EnsureNotDisposed();
                EnsureState(State.NotInitialized);

                ErrorCode errC = ZLibInterop.DeflateInit2_(ref _zStream, level, CompressionMethod.Deflated, windowBits, memLevel, strategy);

                _initializationState = State.InitializedForDeflate;

                return(errC);
            }
Пример #5
0
            public ErrorCode InflateReset(Int32 windowBits)
            {
                EnsureNotDisposed();
                EnsureState(State.InitializedForInflate);

                ErrorCode errC = ZLibInterop.InflateEnd(ref _zStream);

                if (errC != ErrorCode.Ok)
                {
                    _initializationState = State.Disposed;
                    return(errC);
                }

                errC = ZLibInterop.InflateInit2_(ref _zStream, windowBits);
                _initializationState = State.InitializedForInflate;

                return(errC);
            }