Exemplo n.º 1
0
        private void SetDeflater()
        {
            switch (this.config.Flavor)
            {
            case DeflateFlavor.Store:
                this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateNone);
                break;

            case DeflateFlavor.Fast:
                this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateFast);
                break;

            case DeflateFlavor.Slow:
                this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateSlow);
                break;
            }
        }
        private void SetDeflater()
        {
            DeflateFlavor flavor = this.config.Flavor;

            if (flavor != DeflateFlavor.Store)
            {
                if (flavor != DeflateFlavor.Fast)
                {
                    if (flavor == DeflateFlavor.Slow)
                    {
                        this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateSlow);
                    }
                }
                else
                {
                    this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateFast);
                }
            }
            else
            {
                this.DeflateFunction = new DeflateManager.CompressFunc(this.DeflateNone);
            }
        }