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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? trees.c

?? minix操作系統(tǒng)最新版本(3.1.1)的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* =========================================================================== * Initialize a new block. */local void init_block(s)    deflate_state *s;{    int n; /* iterates over tree elements */    /* Initialize the trees. */    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;    s->dyn_ltree[END_BLOCK].Freq = 1;    s->opt_len = s->static_len = 0L;    s->last_lit = s->matches = 0;}#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(s, tree, top) \{\    top = s->heap[SMALLEST]; \    s->heap[SMALLEST] = s->heap[s->heap_len--]; \    pqdownheap(s, 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, depth) \   (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(s, tree, k)    deflate_state *s;    ct_data *tree;  /* the tree to restore */    int k;               /* node to move down */{    int v = s->heap[k];    int j = k << 1;  /* left son of k */    while (j <= s->heap_len) {        /* Set j to the smallest of the two sons: */        if (j < s->heap_len &&            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {            j++;        }        /* Exit if v is smaller than both sons */        if (smaller(tree, v, s->heap[j], s->depth)) break;        /* Exchange v with the smallest son */        s->heap[k] = s->heap[j];  k = j;        /* And continue down the tree, setting j to the left son of k */        j <<= 1;    }    s->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(s, desc)    deflate_state *s;    tree_desc *desc;    /* the tree descriptor */{    ct_data *tree        = desc->dyn_tree;    int max_code         = desc->max_code;    const ct_data *stree = desc->stat_desc->static_tree;    const intf *extra    = desc->stat_desc->extra_bits;    int base             = desc->stat_desc->extra_base;    int max_length       = desc->stat_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++) s->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[s->heap[s->heap_max]].Len = 0; /* root of the heap */    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {        n = s->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 */        s->bl_count[bits]++;        xbits = 0;        if (n >= base) xbits = extra[n-base];        f = tree[n].Freq;        s->opt_len += (ulg)f * (bits + xbits);        if (stree) s->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 (s->bl_count[bits] == 0) bits--;        s->bl_count[bits]--;      /* move one leaf down the tree */        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */        s->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 = s->bl_count[bits];        while (n != 0) {            m = s->heap[--h];            if (m > max_code) continue;            if ((unsigned) tree[m].Len != (unsigned) bits) {                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));                s->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, bl_count)    ct_data *tree;             /* the tree to decorate */    int max_code;              /* largest code with non zero frequency */    ushf *bl_count;            /* number of codes at each bit length */{    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);        Tracecv(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(s, desc)    deflate_state *s;    tree_desc *desc; /* the tree descriptor */{    ct_data *tree         = desc->dyn_tree;    const ct_data *stree  = desc->stat_desc->static_tree;    int elems             = desc->stat_desc->elems;    int n, m;          /* iterate over heap elements */    int max_code = -1; /* largest code with non zero frequency */    int node;          /* new node being created */    /* 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.     */    s->heap_len = 0, s->heap_max = HEAP_SIZE;    for (n = 0; n < elems; n++) {        if (tree[n].Freq != 0) {            s->heap[++(s->heap_len)] = max_code = n;            s->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 (s->heap_len < 2) {        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);        tree[node].Freq = 1;        s->depth[node] = 0;        s->opt_len--; if (stree) s->static_len -= stree[node].Len;        /* node 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 = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);    /* Construct the Huffman tree by repeatedly combining the least two     * frequent nodes.     */    node = elems;              /* next internal node of the tree */    do {        pqremove(s, tree, n);  /* n = node of least frequency */        m = s->heap[SMALLEST]; /* m = node of next least frequency */        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */        s->heap[--(s->heap_max)] = m;        /* Create a new node father of n and m */        tree[node].Freq = tree[n].Freq + tree[m].Freq;        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?                                s->depth[n] : s->depth[m]) + 1);        tree[n].Dad = tree[m].Dad = (ush)node;#ifdef DUMP_BL_TREE        if (tree == s->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 */        s->heap[SMALLEST] = node++;        pqdownheap(s, tree, SMALLEST);    } while (s->heap_len >= 2);    s->heap[--(s->heap_max)] = s->heap[SMALLEST];    /* At this point, the fields freq and dad are set. We can now     * generate the bit lengths.     */    gen_bitlen(s, (tree_desc *)desc);    /* The field len is now set, we can generate the bit codes */    gen_codes ((ct_data *)tree, max_code, s->bl_count);}/* =========================================================================== * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */local void scan_tree (s, tree, max_code)    deflate_state *s;    ct_data *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) {            s->bl_tree[curlen].Freq += count;        } else if (curlen != 0) {            if (curlen != prevlen) s->bl_tree[curlen].Freq++;            s->bl_tree[REP_3_6].Freq++;        } else if (count <= 10) {            s->bl_tree[REPZ_3_10].Freq++;        } else {            s->bl_tree[REPZ_11_138].Freq++;        }        count = 0; prevlen = curlen;        if (nextlen == 0) {            max_count = 138, min_count = 3;        } else if (curlen == nextlen) {            max_count = 6, min_count = 3;        } else {            max_count = 7, min_count = 4;        }    }}/* =========================================================================== * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */local void send_tree (s, tree, max_code)    deflate_state *s;    ct_data *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 */    /* tree[max_code+1].Len = -1; */  /* guard already set */    if (nextlen == 0) max_count = 138, min_count = 3;    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) {            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);        } else if (curlen != 0) {            if (curlen != prevlen) {                send_code(s, curlen, s->bl_tree); count--;            }            Assert(count >= 3 && count <= 6, " 3_6?");            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);        } else if (count <= 10) {            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);        } else {            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);        }        count = 0; prevlen = curlen;        if (nextlen == 0) {            max_count = 138, min_count = 3;        } else if (curlen == nextlen) {            max_count = 6, min_count = 3;        } else {            max_count = 7, min_count = 4;        }    }}/* =========================================================================== * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */local int build_bl_tree(s)    deflate_state *s;{    int max_blindex;  /* index of last bit length code of non zero freq */    /* Determine the bit length frequencies for literal and distance trees */    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);    /* Build the bit length tree: */    build_tree(s, (tree_desc *)(&(s->bl_desc)));    /* opt_len now includes the length of the tree representations, except

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
youjizz久久| 欧美午夜精品免费| 亚洲成人第一页| 国产午夜精品一区二区三区视频| 欧美丝袜丝交足nylons图片| 国产一区二区女| 亚洲一区二区三区影院| 亚洲国产精品t66y| 精品国产精品网麻豆系列| 色94色欧美sute亚洲线路二| 国产精品18久久久久久久久久久久| 亚洲一区二区三区爽爽爽爽爽| 久久精品人人做| 日韩欧美久久久| 欧美专区亚洲专区| 色综合久久九月婷婷色综合| 国产精品456露脸| 精品一二线国产| 午夜影视日本亚洲欧洲精品| 亚洲麻豆国产自偷在线| 国产欧美一区二区精品性| 欧美一区二区视频在线观看2022| 在线一区二区三区四区| thepron国产精品| 国产成人精品亚洲午夜麻豆| 精品一区二区三区香蕉蜜桃| 日韩精品乱码av一区二区| 樱花影视一区二区| 亚洲欧美日韩精品久久久久| 欧美国产激情二区三区| 久久久久久久综合日本| 日韩精品一区二区三区蜜臀| 91精品国产综合久久香蕉麻豆| 色婷婷久久久综合中文字幕| 91日韩精品一区| 色综合一个色综合亚洲| 一本到一区二区三区| 色综合久久88色综合天天免费| 99久久精品费精品国产一区二区| av午夜一区麻豆| 91日韩一区二区三区| 在线观看亚洲精品视频| 欧美色图免费看| 欧美精品xxxxbbbb| 欧美乱妇15p| 日韩视频在线观看一区二区| 日韩手机在线导航| 久久综合九色综合欧美亚洲| 久久九九久精品国产免费直播| 久久久久久久性| 国产精品精品国产色婷婷| 综合久久国产九一剧情麻豆| 一区二区三区在线播| 亚洲国产日韩精品| 全国精品久久少妇| 久久国产精品99久久人人澡| 国产精品综合二区| 成人av电影免费在线播放| 色偷偷成人一区二区三区91| 欧美视频一区二区| 日韩欧美国产一区二区在线播放| 精品国内二区三区| 国产免费久久精品| 亚洲日本护士毛茸茸| 亚洲国产成人av网| 久久不见久久见免费视频1| 国产另类ts人妖一区二区| 99久久精品免费精品国产| 欧美性欧美巨大黑白大战| 欧美一卡在线观看| 欧美高清在线视频| 亚洲综合在线观看视频| 麻豆精品一区二区| 成人免费看片app下载| 在线观看免费成人| 欧美成人video| 国产精品久久三| 日韩av电影免费观看高清完整版在线观看| 久久国产夜色精品鲁鲁99| 91网站最新网址| 日韩一区二区电影网| 综合久久一区二区三区| 麻豆精品视频在线观看| 成人黄色小视频在线观看| 欧美群妇大交群中文字幕| 久久亚洲综合av| 亚洲午夜精品网| 国产成人自拍网| 777a∨成人精品桃花网| 国产精品视频一二三区| 免费成人在线网站| 色噜噜狠狠成人中文综合| 精品国产自在久精品国产| 亚洲精品欧美综合四区| 国产一区二区三区四区五区入口| 欧美三级欧美一级| 国产日韩欧美精品电影三级在线| 亚洲国产视频a| a在线播放不卡| 久久综合色鬼综合色| 亚洲成人激情综合网| 99久久综合精品| 久久久久久日产精品| 日本网站在线观看一区二区三区| 99riav一区二区三区| 国产欧美一区二区精品婷婷| 日日摸夜夜添夜夜添亚洲女人| 97精品视频在线观看自产线路二| 欧美大片一区二区三区| 亚洲不卡在线观看| 91蜜桃网址入口| 欧美激情艳妇裸体舞| 黑人精品欧美一区二区蜜桃| 欧美精品免费视频| 亚洲自拍偷拍网站| 91麻豆免费视频| 国产精品久久久久aaaa樱花 | 天天射综合影视| 99久久精品国产导航| 中文字幕av一区 二区| 国产精品538一区二区在线| 欧美成人精品1314www| 日本不卡1234视频| 91.成人天堂一区| 亚洲一区二区在线免费观看视频| 一本一道综合狠狠老| 国产精品久久影院| 不卡的av在线播放| 国产精品素人一区二区| 床上的激情91.| 日本一区二区三区在线不卡| 国产乱淫av一区二区三区| xnxx国产精品| 黄一区二区三区| 精品国产电影一区二区| 韩国女主播成人在线观看| 欧美电影免费观看高清完整版在线| 青青草97国产精品免费观看 | 精品国产欧美一区二区| 狠狠网亚洲精品| 久久精品一二三| 成人免费观看av| 国产精品青草综合久久久久99| 国产成人在线看| 国产精品女上位| av在线这里只有精品| 亚洲欧美欧美一区二区三区| 91国偷自产一区二区使用方法| 夜夜夜精品看看| 欧美电影在线免费观看| aa级大片欧美| 亚洲日本在线天堂| 欧美少妇一区二区| 日韩中文欧美在线| 欧美精品一区二区三区蜜桃| 国内精品视频一区二区三区八戒| www一区二区| 不卡的av网站| 亚洲综合小说图片| 欧美大片一区二区三区| 从欧美一区二区三区| 亚洲综合免费观看高清完整版| 欧美猛男超大videosgay| 看片的网站亚洲| 中文在线免费一区三区高中清不卡| 色偷偷成人一区二区三区91| 午夜精品在线视频一区| 精品国产成人系列| 97精品电影院| 欧美aaaaa成人免费观看视频| xfplay精品久久| 日本国产一区二区| 蜜桃精品在线观看| 中文字幕一区二区视频| 91精品国产综合久久精品图片| 国产成人av资源| 亚洲一本大道在线| 2020国产精品| 欧美又粗又大又爽| 国产一区不卡精品| 一区二区三区美女| 欧美精品一区二区三区高清aⅴ| 99精品国产热久久91蜜凸| 日本中文一区二区三区| 国产精品美女一区二区三区| 欧美精品精品一区| 不卡电影一区二区三区| 六月丁香婷婷久久| 亚洲精品视频在线看| 欧美xxxxxxxxx| 欧美性猛交xxxx黑人交| 国产成人av一区二区三区在线观看| 亚洲综合自拍偷拍| 国产肉丝袜一区二区| 欧美巨大另类极品videosbest | 精品国产乱子伦一区| 在线观看国产一区二区| 成人综合婷婷国产精品久久| 日韩不卡手机在线v区| 亚洲欧美国产77777|