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

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

?? trees.c

?? tftp client sorser code,Please download it and compolie it ,byebye
?? C
?? 第 1 頁 / 共 3 頁
字號:
    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;        }    }    Assert (dist == 256, "ct_init: dist != 256");    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;        }    }    Assert (dist == 256, "ct_init: 256+dist != 512");    /* 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]++;    /* Codes 286 and 287 do not exist, but we must include them in the     * tree construction to get a canonical Huffman tree (longest code     * all ones)     */    gen_codes((ct_data near *)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(n, 5);    }    /* Initialize the first block of the first file: */    init_block();}/* =========================================================================== * Initialize a new block. */local void init_block(){    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(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). */local void pqdownheap(tree, k)    ct_data near *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. */local void gen_bitlen(desc)    tree_desc near *desc; /* the tree descriptor */{    ct_data near *tree  = desc->dyn_tree;    int near *extra     = desc->extra_bits;    int base            = desc->extra_base;    int max_code        = desc->max_code;    int max_length      = desc->max_length;    ct_data near *stree = desc->static_tree;    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).     */    tree[heap[heap_max]].Len = 0; /* root of the heap */    for (h = heap_max+1; h < HEAP_SIZE; h++) {        n = heap[h];        bits = tree[tree[n].Dad].Len + 1;        if (bits > max_length) bits = max_length, overflow++;        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 = extra[n-base];        f = tree[n].Freq;        opt_len += (ulg)f * (bits + xbits);        if (stree) static_len += (ulg)f * (stree[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 (tree[m].Len != (unsigned) bits) {                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));                opt_len += ((long)bits-(long)tree[m].Len)*(long)tree[m].Freq;                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. */local void gen_codes (tree, max_code)    ct_data near *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.     */    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,            "inconsistent bit counts");    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(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. */local void build_tree(desc)    tree_desc near *desc; /* the tree descriptor */{    ct_data near *tree   = desc->dyn_tree;    ct_data near *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 (tree[n].Freq != 0) {            heap[++heap_len] = max_code = n;            depth[n] = 0;        } else {            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.     */    while (heap_len < 2) {        int new = heap[++heap_len] = (max_code < 2 ? ++max_code : 0);        tree[new].Freq = 1;        depth[new] = 0;        opt_len--; if (stree) static_len -= stree[new].Len;        /* new is 0 or 1 so it does not have extra bits */    }    desc->max_code = max_code;    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,     * establish sub-heaps of increasing lengths:     */    for (n = heap_len/2; n >= 1; n--) pqdownheap(tree, n);    /* Construct the Huffman tree by repeatedly combining the least two     * frequent nodes.     */    do {        pqremove(tree, n);   /* n = node of least frequency */        m = heap[SMALLEST];  /* m = node of next least frequency */        heap[--heap_max] = n; /* keep the nodes sorted by frequency */        heap[--heap_max] = m;        /* Create a new node father of n and m */        tree[node].Freq = tree[n].Freq + tree[m].Freq;        depth[node] = (uch) (MAX(depth[n], depth[m]) + 1);        tree[n].Dad = tree[m].Dad = (ush)node;#ifdef DUMP_BL_TREE        if (tree == bl_tree) {            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);        }#endif        /* and insert the new node in the heap */        heap[SMALLEST] = node++;        pqdownheap(tree, SMALLEST);    } while (heap_len >= 2);    heap[--heap_max] = heap[SMALLEST];    /* At this point, the fields freq and dad are set. We can now     * generate the bit lengths.     */    gen_bitlen((tree_desc near *)desc);    /* The field len is now set, we can generate the bit codes */    gen_codes ((ct_data near *)tree, max_code);}/* =========================================================================== * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. Updates opt_len to take into account the repeat * counts. (The contribution of the bit length codes will be added later * during the construction of bl_tree.) */local void scan_tree (tree, max_code)    ct_data near *tree; /* the tree to be scanned */    int max_code;       /* and its largest code of non zero frequency */{    int n;                     /* iterates over all tree elements */    int prevlen = -1;          /* last emitted length */    int curlen;                /* length of current code */    int nextlen = tree[0].Len; /* length of next code */    int count = 0;             /* repeat count of the current code */    int max_count = 7;         /* max repeat count */    int min_count = 4;         /* min repeat count */    if (nextlen == 0) max_count = 138, min_count = 3;    tree[max_code+1].Len = (ush)0xffff; /* guard */    for (n = 0; n <= max_code; n++) {        curlen = nextlen; nextlen = tree[n+1].Len;        if (++count < max_count && curlen == nextlen) {            continue;        } else if (count < min_count) {            bl_tree[curlen].Freq += count;        } else if (curlen != 0) {            if (curlen != prevlen) bl_tree[curlen].Freq++;            bl_tree[REP_3_6].Freq++;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久国产一区二区三区四区| 国产一区二区在线电影| 亚洲午夜免费电影| 日本不卡视频在线| 精品一区二区免费看| 成人h动漫精品| 欧美一区二区三区的| 中文字幕av资源一区| 图片区小说区区亚洲影院| 激情综合色综合久久综合| 欧美亚洲动漫精品| 蜜臀av一区二区| 色婷婷亚洲综合| 欧美二区在线观看| 2024国产精品| 亚洲美女偷拍久久| 国产99久久久国产精品| 欧美日韩精品欧美日韩精品一| 久久久精品日韩欧美| 一区二区三区在线观看国产| 国产91在线观看丝袜| 这里只有精品免费| 亚洲乱码国产乱码精品精小说| 久久国产精品99精品国产| 91国产福利在线| 国产亚洲自拍一区| 国精产品一区一区三区mba视频| 欧美性生活久久| 国产精品午夜在线观看| 国产精品免费丝袜| 欧美无人高清视频在线观看| 亚洲国产精品综合小说图片区| 日韩精品一区国产麻豆| 高清beeg欧美| 亚洲18色成人| 亚洲欧美日韩小说| 欧美激情一区二区三区不卡| 欧美在线不卡视频| 国产91对白在线观看九色| 亚洲成人免费在线观看| 国产色婷婷亚洲99精品小说| 91精品国产一区二区三区| 奇米色一区二区| aaa欧美大片| 亚洲精品精品亚洲| 最新中文字幕一区二区三区 | 97久久超碰精品国产| 精品一区二区三区av| 欧美精品第1页| 亚洲五码中文字幕| 在线亚洲一区二区| 一区二区三区视频在线观看| 欧美色视频在线| 国产三级精品三级在线专区| 粉嫩aⅴ一区二区三区四区| 国产精品久久久久影院色老大| 99精品视频在线免费观看| 亚洲精品中文在线| 欧美一区二区三区影视| 国产麻豆精品久久一二三| 成人欧美一区二区三区在线播放| 在线亚洲一区二区| 秋霞av亚洲一区二区三| 国产三级欧美三级| 精品视频一区三区九区| 国产一区二区0| 一区二区激情视频| 精品免费日韩av| 在线视频一区二区免费| 蜜桃久久精品一区二区| 18欧美乱大交hd1984| 欧美一卡在线观看| 91小视频在线| 国产真实乱子伦精品视频| 亚洲精品免费视频| 久久人人爽人人爽| 欧美视频在线观看一区| 国产在线精品一区二区三区不卡| 一区二区三区毛片| 国产午夜精品久久久久久免费视| 一本久道中文字幕精品亚洲嫩| 黑人巨大精品欧美一区| 亚洲成人在线网站| 中文字幕精品在线不卡| 精品久久久久久久久久久久久久久 | 亚洲成精国产精品女| 久久一区二区三区四区| 欧美日韩精品电影| 91免费版pro下载短视频| 亚洲国产欧美日韩另类综合| 欧美精品v日韩精品v韩国精品v| 春色校园综合激情亚洲| 奇米影视在线99精品| 亚洲影院在线观看| 中文字幕在线不卡一区| 久久色在线视频| 日韩欧美www| 欧美成人激情免费网| 欧美最新大片在线看| eeuss国产一区二区三区| 精品一二三四区| 看片网站欧美日韩| 午夜精品久久久久久久久久久| 亚洲嫩草精品久久| 亚洲欧洲综合另类| 亚洲丝袜精品丝袜在线| 国产精品色在线| 亚洲国产精品二十页| 国产午夜精品福利| 久久精品一区二区| 精品国产麻豆免费人成网站| 欧美成人免费网站| 日韩欧美国产一二三区| 日韩三级.com| 亚洲精品一区二区三区四区高清| 日韩你懂的电影在线观看| 在线综合视频播放| 日韩三级精品电影久久久| 日韩欧美第一区| www久久精品| 国产精品视频九色porn| 亚洲丝袜另类动漫二区| 亚洲女人小视频在线观看| 一区二区三区视频在线观看| 亚洲一级在线观看| 青青草原综合久久大伊人精品| 天天色综合成人网| 免费观看一级欧美片| 国产一区三区三区| 成人高清免费观看| 国产制服丝袜一区| 国产综合一区二区| 国产午夜亚洲精品理论片色戒| 一本色道久久综合精品竹菊| 老司机午夜精品| 欧美日韩一区二区三区高清 | 91国偷自产一区二区开放时间| 欧日韩精品视频| 日韩欧美视频在线| 国产网站一区二区| 一区二区三区在线影院| 免费在线看成人av| 国产成人午夜精品5599| 色综合久久久久| 日韩视频一区在线观看| 国产日本一区二区| 五月天精品一区二区三区| 国产在线不卡一区| 色悠久久久久综合欧美99| 337p亚洲精品色噜噜狠狠| 国产欧美日韩视频在线观看| 亚洲一区二区视频| 国产成人综合网| 欧美精品色综合| 在线视频观看一区| 欧美一二三四在线| 久久一区二区视频| 亚洲图片欧美色图| 从欧美一区二区三区| 正在播放一区二区| 国产精品福利一区二区| 日韩精品乱码av一区二区| 夫妻av一区二区| 欧美一区二区精品在线| 亚洲欧美日韩国产综合在线| 国产综合久久久久影院| 欧美日韩一区二区三区高清| 日本一区二区综合亚洲| 日韩成人一级片| 欧美影视一区二区三区| 久久久久久久久久久99999| 日韩国产一区二| 欧美中文字幕一区| 国产精品美女久久久久aⅴ| 六月丁香婷婷色狠狠久久| 欧美性生交片4| 亚洲乱码一区二区三区在线观看| 国产精品一区专区| 日韩色在线观看| 日韩av电影免费观看高清完整版| 色婷婷av一区| 亚洲欧美日韩久久精品| 丁香啪啪综合成人亚洲小说| www一区二区| 91蝌蚪国产九色| 国产一区二区三区综合| 欧美午夜宅男影院| 综合久久久久久久| 成人午夜精品一区二区三区| 欧美成人a视频| 免费高清视频精品| 91精品婷婷国产综合久久| 亚洲高清视频在线| 欧美中文字幕亚洲一区二区va在线| 亚洲乱码国产乱码精品精小说| 97超碰欧美中文字幕| 日本一区二区久久| 成人影视亚洲图片在线| 国产精品私人影院| www.亚洲国产|