示例#1
0
 public DeflaterHuffman(DeflaterPending pending)
 {
     this._pending = pending;
     _literalTree = new Tree(this, 0x11e, 0x101, 15);
     _distTree = new Tree(this, 30, 1, 15);
     _blTree = new Tree(this, 0x13, 4, 7);
     _dBuf = new short[0x4000];
     _lBuf = new byte[0x4000];
 }
示例#2
0
 public DeflaterEngine(DeflaterPending pending)
 {
     this.pending = pending;
     huffman = new DeflaterHuffman(pending);
     adler = new Adler32();
     window = new byte[0x10000];
     head = new short[0x8000];
     prev = new short[0x8000];
     blockStart = strstart = 1;
 }
示例#3
0
 public Deflater(int level, bool noZlibHeaderOrFooter = false)
 {
     if (level == -1)
     {
         level = 6;
     }
     else if ((level < 0) || (level > 9))
     {
         throw new ArgumentOutOfRangeException("level");
     }
     pending = new DeflaterPending();
     engine  = new DeflaterEngine(pending);
     this.noZlibHeaderOrFooter = noZlibHeaderOrFooter;
     SetStrategy(DeflateStrategy.Default);
     SetLevel(level);
     Reset();
 }
示例#4
0
 public Deflater(int level, bool noZlibHeaderOrFooter = false)
 {
     if (level == -1)
     {
         level = 6;
     }
     else if ((level < 0) || (level > 9))
     {
         throw new ArgumentOutOfRangeException("level");
     }
     pending = new DeflaterPending();
     engine = new DeflaterEngine(pending);
     this.noZlibHeaderOrFooter = noZlibHeaderOrFooter;
     SetStrategy(DeflateStrategy.Default);
     SetLevel(level);
     Reset();
 }