亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? zip.cpp

?? zip解壓源碼.
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
        if (prev_length >= MIN_MATCH && match_length <= prev_length) {

            flush = ct_tally( zipdate,strstart-1-prev_match, prev_length - MIN_MATCH);

            /* Insert in hash table all strings up to the end of the match.
             * strstart-1 and strstart are already inserted.
             */
            lookahead -= prev_length-1;
            prev_length -= 2;
            do {
                strstart++;
                INSERT_STRING(strstart, hash_head);
                /* strstart never exceeds WSIZE-MAX_MATCH, so there are
                 * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH
                 * these bytes are garbage, but it does not matter since the
                 * next lookahead bytes will always be emitted as literals.
                 */
            } while (--prev_length != 0);
            match_available = 0;
            match_length = MIN_MATCH-1;
            strstart++;
            if (flush)
				FLUSH_BLOCK(0), block_start = strstart;

        } else if (match_available) {
            /* If there was no match at the previous position, output a
             * single literal. If there was a match but the current match
             * is longer, truncate the previous match to a single literal.
             */
            Tracevv((stderr,"%c",window[strstart-1]));
            if (ct_tally( zipdate,0, window[strstart-1])) {
                FLUSH_BLOCK(0), block_start = strstart;
            }
            strstart++;
            lookahead--;
        } else {
            /* There is no previous match to compare with, wait for
             * the next step to decide.
             */
            match_available = 1;
            strstart++;
            lookahead--;
        }

        /* Make sure that we always have enough lookahead, except
         * at the end of the input file. We need MAX_MATCH bytes
         * for the next match, plus MIN_MATCH bytes to insert the
         * string following the next match.
         */
        while (lookahead < MIN_LOOKAHEAD && !eofile)
		{
			fill_window( zipdate);
			lookahead=lookahead;
		}
    }
    if (match_available) ct_tally( zipdate,0, window[strstart-1]);

    return FLUSH_BLOCK(1); /* eof */
}

//===============================================
//#include "trees.h"
#define Freq fc.freq
#define Code fc.code
#define Dad  dl.dad
#define Len  dl.len
#define l_buf inbuf

#ifndef DEBUG
#  define send_code(c, tree) send_bits( zipdate,tree[c].Code, tree[c].Len)
   /* Send a code of the given tree. c and tree must not have side effects */

#else /* DEBUG */
#  define send_code(c, tree) \
     { if (verbose>1) fprintf(stderr,"\ncd %3d ",(c)); \
       send_bits( zipdate,tree[c].Code, tree[c].Len); }
#endif

#define d_code(dist) \
   ((dist) < 256 ? dist_code[dist] : dist_code[256+((dist)>>7)])

#define MAX(a,b) (a >= b ? a : b)

void ct_init(ZipDate* zipdate) /* pointer to compression method */
{
    int n;        /* iterates over tree elements */
    int bits;     /* bit counter */
    int length;   /* length value */
    int code;     /* code value */
    int dist;     /* distance index */

    compressed_len = input_len = 0L;
        
    length = 0;
    for (code = 0; code < LENGTH_CODES-1; code++) {
        base_length[code] = length;
        for (n = 0; n < (1<<extra_lbits[code]); n++) {
            length_code[length++] = (uch)code;
        }
    }
    length_code[length-1] = (uch)code;

    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
    dist = 0;
    for (code = 0 ; code < 16; code++) {
        base_dist[code] = dist;
        for (n = 0; n < (1<<extra_dbits[code]); n++) {
            dist_code[dist++] = (uch)code;
        }
    }
    dist >>= 7; /* from now on, all distances are divided by 128 */
    for ( ; code < D_CODES; code++) {
        base_dist[code] = dist << 7;
        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
            dist_code[256 + dist++] = (uch)code;
        }
    }

    /* Construct the codes of the static literal tree */
    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
    n = 0;
    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
    gen_codes( zipdate,(ct_data *)static_ltree, L_CODES+1);

    /* The static distance tree is trivial: */
    for (n = 0; n < D_CODES; n++) {
        static_dtree[n].Len = 5;
        static_dtree[n].Code = bi_reverse( zipdate,n, 5);
    }

    /* Initialize the first block of the first file: */
    init_block( zipdate);
}

/* ===========================================================================
 * Initialize a new block.
 */
void init_block(ZipDate* zipdate)
{
    int n; /* iterates over tree elements */

    /* Initialize the trees. */
    for (n = 0; n < L_CODES;  n++) dyn_ltree[n].Freq = 0;
    for (n = 0; n < D_CODES;  n++) dyn_dtree[n].Freq = 0;
    for (n = 0; n < BL_CODES; n++) bl_tree[n].Freq = 0;

    dyn_ltree[END_BLOCK].Freq = 1;
    opt_len = static_len = 0L;
    last_lit = last_dist = last_flags = 0;
    flags = 0; flag_bit = 1;
}

#define SMALLEST 1
/* Index within the heap array of least frequent node in the Huffman tree */


/* ===========================================================================
 * Remove the smallest element from the heap and recreate the heap with
 * one less element. Updates heap and heap_len.
 */
#define pqremove(tree, top) \
{\
    top = heap[SMALLEST]; \
    heap[SMALLEST] = heap[heap_len--]; \
    pqdownheap( zipdate,tree, SMALLEST); \
}

/* ===========================================================================
 * Compares to subtrees, using the tree depth as tie breaker when
 * the subtrees have equal frequency. This minimizes the worst case length.
 */
#define smaller(tree, n, m) \
   (tree[n].Freq < tree[m].Freq || \
   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))

/* ===========================================================================
 * Restore the heap property by moving down the tree starting at node k,
 * exchanging a node with the smallest of its two sons if necessary, stopping
 * when the heap property is re-established (each father smaller than its
 * two sons).
 */
void pqdownheap(ZipDate* zipdate,	ct_data *tree,  /* the tree to restore */
						int			 k)               /* node to move down */
{
    int v = heap[k];
    int j = k << 1;  /* left son of k */
    while (j <= heap_len) {
        /* Set j to the smallest of the two sons: */
        if (j < heap_len && smaller(tree, heap[j+1], heap[j])) j++;

        /* Exit if v is smaller than both sons */
        if (smaller(tree, v, heap[j])) break;

        /* Exchange v with the smallest son */
        heap[k] = heap[j];  k = j;

        /* And continue down the tree, setting j to the left son of k */
        j <<= 1;
    }
    heap[k] = v;
}

/* ===========================================================================
 * Compute the optimal bit lengths for a tree and update the total bit length
 * for the current block.
 * IN assertion: the fields freq and dad are set, heap[heap_max] and
 *    above are the tree nodes sorted by increasing frequency.
 * OUT assertions: the field len is set to the optimal bit length, the
 *     array bl_count contains the frequencies for each bit length.
 *     The length opt_len is updated; static_len is also updated if stree is
 *     not null.
 */
void gen_bitlen(ZipDate* zipdate,tree_desc *desc) /* the tree descriptor */
{
    int base            = desc->extra_base;
    int max_code        = desc->max_code;
    int max_length      = desc->max_length;

    int h;              /* heap index */
    int n, m;           /* iterate over the tree elements */
    int bits;           /* bit length */
    int xbits;          /* extra bits */
    ush f;              /* frequency */
    int overflow = 0;   /* number of elements with bit length too large */

    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;

    /* In a first pass, compute the optimal bit lengths (which may
     * overflow in the case of the bit length tree).
     */
    desc->dyn_tree[heap[heap_max]].Len = 0; /* root of the heap */

    for (h = heap_max+1; h < HEAP_SIZE; h++) {
        n = heap[h];
        bits = desc->dyn_tree[desc->dyn_tree[n].Dad].Len + 1;
        if (bits > max_length) bits = max_length, overflow++;
        desc->dyn_tree[n].Len = (ush)bits;
        /* We overwrite tree[n].Dad which is no longer needed */

        if (n > max_code) continue; /* not a leaf node */

        bl_count[bits]++;
        xbits = 0;
        if (n >= base) xbits = desc->extra_bits[n-base];
        f = desc->dyn_tree[n].Freq;
        opt_len += (ulg)f * (bits + xbits);
        if (desc->static_tree) static_len += (ulg)f * (desc->static_tree[n].Len + xbits);
    }
    if (overflow == 0) return;

    Trace((stderr,"\nbit length overflow\n"));
    /* This happens for example on obj2 and pic of the Calgary corpus */

    /* Find the first bit length which could increase: */
    do {
        bits = max_length-1;
        while (bl_count[bits] == 0) bits--;
        bl_count[bits]--;      /* move one leaf down the tree */
        bl_count[bits+1] += 2; /* move one overflow item as its brother */
        bl_count[max_length]--;
        /* The brother of the overflow item also moves one step up,
         * but this does not affect bl_count[max_length]
         */
        overflow -= 2;
    } while (overflow > 0);

    /* Now recompute all bit lengths, scanning in increasing frequency.
     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
     * lengths instead of fixing only the wrong ones. This idea is taken
     * from 'ar' written by Haruhiko Okumura.)
     */
    for (bits = max_length; bits != 0; bits--) {
        n = bl_count[bits];
        while (n != 0) {
            m = heap[--h];
            if (m > max_code) continue;
            if (desc->dyn_tree[m].Len != (unsigned) bits) {
                Trace((stderr,"code %d bits %d->%d\n", m, desc->dyn_tree[m].Len, bits));
                opt_len += ((long)bits-(long)desc->dyn_tree[m].Len)*(long)desc->dyn_tree[m].Freq;
                desc->dyn_tree[m].Len = (ush)bits;
            }
            n--;
        }
    }
}

/* ===========================================================================
 * Generate the codes for a given tree and bit counts (which need not be
 * optimal).
 * IN assertion: the array bl_count contains the bit length statistics for
 * the given tree and the field len is set for all tree elements.
 * OUT assertion: the field code is set for all tree elements of non
 *     zero code length.
 */
void gen_codes(ZipDate* zipdate,ct_data *tree,        /* the tree to decorate */
					int		max_code)              /* largest code with non zero frequency */
{
    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
    ush code = 0;              /* running code value */
    int bits;                  /* bit index */
    int n;                     /* code index */

    /* The distribution counts are first used to generate the code values
     * without bit reversal.
     */
    for (bits = 1; bits <= MAX_BITS; bits++) {
        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
    }
    /* Check that the bit counts in bl_count are consistent. The last code
     * must be all ones.
     */
    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));

    for (n = 0;  n <= max_code; n++) {
        int len = tree[n].Len;
        if (len == 0) continue;
        /* Now reverse the bits */
        tree[n].Code = bi_reverse( zipdate,next_code[len]++, len);

        Tracec(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
    }
}

/* ===========================================================================
 * Construct one Huffman tree and assigns the code bit strings and lengths.
 * Update the total bit length for the current block.
 * IN assertion: the field freq is set for all tree elements.
 * OUT assertions: the fields len and code are set to the optimal bit length
 *     and corresponding code. The length opt_len is updated; static_len is
 *     also updated if stree is not null. The field max_code is set.
 */
void build_tree(ZipDate* zipdate,tree_desc *desc) /* the tree descriptor */
{
//    ct_data *tree= desc->dyn_tree;
//    ct_data *stree  = desc->static_tree;
    int elems = desc->elems;
    int n, m;          /* iterate over heap elements */
    int max_code = -1; /* largest code with non zero frequency */
    int node = elems;  /* next internal node of the tree */

    /* Construct the initial heap, with least frequent element in
     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
     * heap[0] is not used.
     */
    heap_len = 0, heap_max = HEAP_SIZE;

    for (n = 0; n < elems; n++) {
        if (desc->dyn_tree[n].Freq != 0) {
            heap[++heap_len] = max_code = n;
            depth[n] = 0;
        } else {
            desc->dyn_tree[n].Len = 0;
        }
    }

    /* The pkzip format requires that at least one distance code exists,
     * and that at least one bit should be sent even if there is only one
     * possible code. So to avoid special checks later on we force at least
     * two codes of non zero frequency.
     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夫妻av一区二区| 在线免费观看日本欧美| 99久久精品免费看国产| 91精品国产麻豆国产自产在线| 日韩一区二区三区免费观看| 国产精品天天摸av网| 亚洲福利一二三区| 97精品久久久午夜一区二区三区 | 国产欧美日韩不卡免费| 亚洲最新视频在线观看| 成人午夜激情片| 色综合色狠狠天天综合色| 4438亚洲最大| 免费在线观看一区二区三区| 欧美mv日韩mv国产网站app| 精品一区二区三区视频| 成人免费的视频| 91社区在线播放| 91麻豆精品国产91久久久久久久久 | 91蜜桃在线观看| 亚洲线精品一区二区三区| 91精品国产综合久久久蜜臀粉嫩| 精品一区二区久久久| 亚洲欧美另类图片小说| 777色狠狠一区二区三区| 国产成人精品亚洲777人妖| 亚洲一区二区三区小说| 欧美精品一区二区在线播放| av成人免费在线观看| 日韩高清不卡一区| 国产精品三级av在线播放| 欧美日韩成人综合在线一区二区 | 26uuu欧美| 91丨porny丨蝌蚪视频| 日产国产欧美视频一区精品| 国产欧美日韩麻豆91| 欧美日韩一级二级| 懂色av一区二区三区蜜臀| 亚洲成年人网站在线观看| 国产亚洲欧美中文| 欧美日韩精品一区二区在线播放| 久久精品国内一区二区三区| 亚洲视频一二三| 久久综合九色综合97婷婷女人 | 亚洲欧洲一区二区在线播放| 欧美一级黄色片| 色婷婷精品久久二区二区蜜臂av| 久久99精品一区二区三区 | 亚洲电影一级片| 国产精品成人免费在线| 欧美精品一区二区三区久久久| 欧美日韩一区不卡| 不卡av在线免费观看| 九九视频精品免费| 轻轻草成人在线| 一区二区三区欧美激情| 亚洲国产高清aⅴ视频| 精品毛片乱码1区2区3区| 6080日韩午夜伦伦午夜伦| 欧美综合视频在线观看| 91在线观看一区二区| 国产美女精品一区二区三区| 男女视频一区二区| 日韩vs国产vs欧美| 亚洲一卡二卡三卡四卡无卡久久| **欧美大码日韩| 久久久久久**毛片大全| 日韩亚洲欧美在线| 欧美一级理论片| 欧美一二三区精品| 欧美一区三区二区| 欧美一区二区视频观看视频| 欧美乱熟臀69xxxxxx| 欧美丝袜丝交足nylons图片| 在线观看免费亚洲| 在线观看视频一区| 欧美在线播放高清精品| 在线精品视频小说1| 色哟哟国产精品| 欧美性做爰猛烈叫床潮| 欧美性做爰猛烈叫床潮| 欧美日韩精品久久久| 91精品午夜视频| 日韩一区二区三| 欧美电视剧免费全集观看 | 欧美激情中文不卡| 欧美激情一区二区三区四区| 欧美韩国一区二区| 中文字幕精品综合| 亚洲丝袜制服诱惑| 亚洲与欧洲av电影| 日韩国产欧美三级| 九九精品一区二区| 成人精品视频一区| 在线欧美日韩国产| 538prom精品视频线放| 久久女同精品一区二区| 国产精品久久久久久户外露出| 亚洲免费观看高清完整| 亚洲成人福利片| 激情欧美一区二区| 91年精品国产| 7777女厕盗摄久久久| 久久蜜桃av一区二区天堂| 国产欧美日韩三级| 亚洲成av人片一区二区三区| 美国三级日本三级久久99 | 麻豆91精品91久久久的内涵| 国产精品综合一区二区三区| eeuss鲁片一区二区三区在线观看| 精品污污网站免费看| 欧美成人三级电影在线| 最新不卡av在线| 老色鬼精品视频在线观看播放| 懂色中文一区二区在线播放| 欧美日韩成人综合天天影院 | 91免费在线视频观看| 日韩欧美一二区| **欧美大码日韩| 美腿丝袜一区二区三区| 91原创在线视频| 精品国产免费人成在线观看| 亚洲另类在线一区| 国产一区欧美日韩| 欧美色图激情小说| 国产视频一区在线播放| 午夜精品久久久久| 9i在线看片成人免费| 精品国产一区二区三区久久久蜜月| 亚洲欧美综合网| 麻豆视频一区二区| 91丨porny丨在线| 国产亚洲1区2区3区| 石原莉奈一区二区三区在线观看| 成人激情综合网站| 欧美白人最猛性xxxxx69交| 一区二区三区四区蜜桃| 国产成a人无v码亚洲福利| 4438x成人网最大色成网站| 国产精品成人在线观看| 麻豆精品久久精品色综合| 91久久精品国产91性色tv| 国产三级精品三级| 日本午夜精品视频在线观看| 色噜噜狠狠色综合欧洲selulu| 久久久www成人免费无遮挡大片 | 久久99国产精品尤物| 欧美日韩一区二区三区不卡| 亚洲精品videosex极品| 国产ts人妖一区二区| 欧美精品一区二区三区一线天视频| 亚洲一区电影777| 欧洲一区二区三区在线| 中文字幕色av一区二区三区| 国产69精品久久久久毛片| 精品第一国产综合精品aⅴ| 人人爽香蕉精品| 3751色影院一区二区三区| 亚洲一区二区在线观看视频| 91麻豆.com| 亚洲免费成人av| 色狠狠一区二区| 一区二区三区四区五区视频在线观看 | 国产日韩欧美激情| 精品一二三四区| 精品少妇一区二区三区日产乱码 | 久久久久久久久久久99999| 老司机一区二区| 精品日韩99亚洲| 国产麻豆一精品一av一免费 | 久久蜜桃av一区二区天堂| 韩国一区二区三区| 2022国产精品视频| 国产激情视频一区二区在线观看 | 久久久久久久久久看片| 国产精品亚洲人在线观看| 久久久久久麻豆| 粉嫩欧美一区二区三区高清影视| 欧美国产精品中文字幕| av电影天堂一区二区在线观看| 亚洲男女毛片无遮挡| 在线观看亚洲专区| 亚洲成人资源在线| 欧美videos中文字幕| 国产成人精品免费网站| 国产精品久久久久久久久图文区| 色老综合老女人久久久| 亚洲成在线观看| 日韩精品自拍偷拍| 成人一区在线观看| 亚洲一区二区影院| 日韩欧美在线一区二区三区| 国产老女人精品毛片久久| 亚洲素人一区二区| 欧美日韩一区二区在线观看| 国产在线精品一区二区不卡了| 亚洲视频每日更新| 91精品蜜臀在线一区尤物| 国产成人综合自拍| 亚洲一区二区三区免费视频|