예제 #1
0
        private void DeflateReset(ZLibStream zStream)
        {
            zStream.TotalIn  = zStream.TotalOut = 0;
            zStream.Message  = null;
            zStream.DataType = ZUNKNOWN;

            this.Pending    = 0;
            this.PendingOut = 0;

            if (this.NoHeader < 0)
            {
                this.NoHeader = 0; // was set to -1 by deflate(..., Z_FINISH);
            }

            this.status   = (this.NoHeader != 0) ? BUSYSTATE : INITSTATE;
            zStream.Adler = Adler32.SeedValue;

            this.lastFlush = FlushMode.NoFlush;

            Trees.Tr_init(this);
            this.Lm_init();
        }
예제 #2
0
        private CompressionState DeflateReset(ZStream strm)
        {
            strm.TotalIn  = strm.TotalOut = 0;
            strm.Msg      = null;
            strm.DataType = ZUNKNOWN;

            this.Pending    = 0;
            this.PendingOut = 0;

            if (this.Noheader < 0)
            {
                this.Noheader = 0; // was set to -1 by deflate(..., Z_FINISH);
            }

            this.status = (this.Noheader != 0) ? BUSYSTATE : INITSTATE;
            strm.Adler  = Adler32.SeedValue;

            this.lastFlush = FlushStrategy.NoFlush;

            Trees.Tr_init(this);
            this.Lm_init();
            return(CompressionState.ZOK);
        }