Ejemplo n.º 1
0
            public ErrorCode Inflate(FlushCode flush)
            {
                EnsureNotDisposed();
                EnsureState(State.InitializedForInflate);

                return(ZLibInterop.Inflate(ref _zStream, flush));
            }
Ejemplo n.º 2
0
            public ErrorCode InflateEnd()
            {
                EnsureNotDisposed();
                EnsureState(State.InitializedForInflate);

                ErrorCode errC = ZLibInterop.InflateEnd(ref _zStream);

                _initializationState = State.Disposed;

                return(errC);
            }
Ejemplo n.º 3
0
            public ErrorCode InflateInit2_(Int32 windowBits)
            {
                EnsureNotDisposed();
                EnsureState(State.NotInitialized);

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

                _initializationState = State.InitializedForInflate;

                return(errC);
            }
Ejemplo n.º 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);
            }
Ejemplo n.º 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);
            }