示例#1
0
 public Tree(DeflaterHuffman dh, int elems, int minCodes, int maxLength)
 {
     this.dh = dh;
     this.minNumCodes = minCodes;
     this.maxLength = maxLength;
     freqs = new short[elems];
     bl_counts = new int[maxLength];
 }
示例#2
0
        /// <summary>
        /// Construct instance with pending buffer
        /// </summary>
        /// <param name="pending">
        /// Pending buffer to use
        /// </param>>
        public DeflaterEngine(DeflaterPending pending)
        {
            this.pending = pending;
            huffman = new DeflaterHuffman(pending);
            adler = new Adler32();

            window = new byte[2 * WSIZE];
            head = new short[HASH_SIZE];
            prev = new short[WSIZE];

            // We start at index 1, to avoid an implementation deficiency, that
            // we cannot build a repeat pattern at index 0.
            blockStart = strstart = 1;
        }