public DeflaterHuffman(DeflaterPending pending)
 {
     this.pending = pending;
     this.literalTree = new Tree(this, LITERAL_NUM, 0x101, 15);
     this.distTree = new Tree(this, DIST_NUM, 1, 15);
     this.blTree = new Tree(this, BITLEN_NUM, 4, 7);
     this.d_buf = new short[BUFSIZE];
     this.l_buf = new byte[BUFSIZE];
 }
 public DeflaterEngine(DeflaterPending pending)
 {
     this.pending = pending;
     this.huffman = new DeflaterHuffman(pending);
     this.adler = new Adler32();
     this.window = new byte[0x10000];
     this.head = new short[0x8000];
     this.prev = new short[0x8000];
     this.blockStart = this.strstart = 1;
 }
Beispiel #3
0
 public Deflater(int lvl, bool nowrap)
 {
     if (lvl == DEFAULT_COMPRESSION)
     {
         lvl = 6;
     }
     else if ((lvl < NO_COMPRESSION) || (lvl > BEST_COMPRESSION))
     {
         throw new ArgumentOutOfRangeException("lvl");
     }
     this.pending = new DeflaterPending();
     this.engine = new DeflaterEngine(this.pending);
     this.noHeader = nowrap;
     this.SetStrategy(DeflateStrategy.Default);
     this.SetLevel(lvl);
     this.Reset();
 }