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

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

?? deflate.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    ds->strm = dest;

    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
    ds->pending_buf = (uchf *) overlay;

    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
        ds->pending_buf == Z_NULL) {
        deflateEnd (dest);
        return Z_MEM_ERROR;
    }
    /* following zmemcpy do not work for 16-bit MSDOS */
    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);

    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;

    ds->l_desc.dyn_tree = ds->dyn_ltree;
    ds->d_desc.dyn_tree = ds->dyn_dtree;
    ds->bl_desc.dyn_tree = ds->bl_tree;

    return Z_OK;
#endif /* MAXSEG_64K */
}

/* ===========================================================================
 * Read a new buffer from the current input stream, update the adler32
 * and total number of bytes read.  All deflate() input goes through
 * this function so some applications may wish to modify it to avoid
 * allocating a large strm->next_in buffer and copying from it.
 * (See also flush_pending()).
 */
local int read_buf(strm, buf, size)
    z_streamp strm;
    Bytef *buf;
    unsigned size;
{
    unsigned len = strm->avail_in;

    if (len > size) len = size;
    if (len == 0) return 0;

    strm->avail_in  -= len;

    if (strm->state->wrap == 1) {
        strm->adler = adler32(strm->adler, strm->next_in, len);
    }
#ifdef GZIP
    else if (strm->state->wrap == 2) {
        strm->adler = crc32(strm->adler, strm->next_in, len);
    }
#endif
    zmemcpy(buf, strm->next_in, len);
    strm->next_in  += len;
    strm->total_in += len;

    return (int)len;
}

/* ===========================================================================
 * Initialize the "longest match" routines for a new zlib stream
 */
local void lm_init (s)
    deflate_state *s;
{
    s->window_size = (ulg)2L*s->w_size;

    CLEAR_HASH(s);

    /* Set the default configuration parameters:
     */
    s->max_lazy_match   = configuration_table[s->level].max_lazy;
    s->good_match       = configuration_table[s->level].good_length;
    s->nice_match       = configuration_table[s->level].nice_length;
    s->max_chain_length = configuration_table[s->level].max_chain;

    s->strstart = 0;
    s->block_start = 0L;
    s->lookahead = 0;
    s->match_length = s->prev_length = MIN_MATCH-1;
    s->match_available = 0;
    s->ins_h = 0;
#ifdef ASMV
    match_init(); /* initialize the asm code */
#endif
}

#ifndef FASTEST
/* ===========================================================================
 * Set match_start to the longest match starting at the given string and
 * return its length. Matches shorter or equal to prev_length are discarded,
 * in which case the result is equal to prev_length and match_start is
 * garbage.
 * IN assertions: cur_match is the head of the hash chain for the current
 *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
 * OUT assertion: the match length is not greater than s->lookahead.
 */
#ifndef ASMV
/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
 * match.S. The code will be functionally equivalent.
 */
local uInt longest_match(s, cur_match)
    deflate_state *s;
    IPos cur_match;                             /* current match */
{
    unsigned chain_length = s->max_chain_length;/* max hash chain length */
    register Bytef *scan = s->window + s->strstart; /* current string */
    register Bytef *match;                       /* matched string */
    register int len;                           /* length of current match */
    int best_len = s->prev_length;              /* best match length so far */
    int nice_match = s->nice_match;             /* stop if match long enough */
    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
        s->strstart - (IPos)MAX_DIST(s) : NIL;
    /* Stop when cur_match becomes <= limit. To simplify the code,
     * we prevent matches with the string of window index 0.
     */
    Posf *prev = s->prev;
    uInt wmask = s->w_mask;

#ifdef UNALIGNED_OK
    /* Compare two bytes at a time. Note: this is not always beneficial.
     * Try with and without -DUNALIGNED_OK to check.
     */
    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
    register ush scan_start = *(ushf*)scan;
    register ush scan_end   = *(ushf*)(scan+best_len-1);
#else
    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
    register Byte scan_end1  = scan[best_len-1];
    register Byte scan_end   = scan[best_len];
#endif

    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
     * It is easy to get rid of this optimization if necessary.
     */
    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");

    /* Do not waste too much time if we already have a good match: */
    if (s->prev_length >= s->good_match) {
        chain_length >>= 2;
    }
    /* Do not look for matches beyond the end of the input. This is necessary
     * to make deflate deterministic.
     */
    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;

    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");

    do {
        Assert(cur_match < s->strstart, "no future");
        match = s->window + cur_match;

        /* Skip to next match if the match length cannot increase
         * or if the match length is less than 2:
         */
#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
        /* This code assumes sizeof(unsigned short) == 2. Do not use
         * UNALIGNED_OK if your compiler uses a different size.
         */
        if (*(ushf*)(match+best_len-1) != scan_end ||
            *(ushf*)match != scan_start) continue;

        /* It is not necessary to compare scan[2] and match[2] since they are
         * always equal when the other bytes match, given that the hash keys
         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
         * strstart+3, +5, ... up to strstart+257. We check for insufficient
         * lookahead only every 4th comparison; the 128th check will be made
         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
         * necessary to put more guard bytes at the end of the window, or
         * to check more often for insufficient lookahead.
         */
        Assert(scan[2] == match[2], "scan[2]?");
        scan++, match++;
        do {
        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
                 scan < strend);
        /* The funny "do {}" generates better code on most compilers */

        /* Here, scan <= window+strstart+257 */
        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
        if (*scan == *match) scan++;

        len = (MAX_MATCH - 1) - (int)(strend-scan);
        scan = strend - (MAX_MATCH-1);

#else /* UNALIGNED_OK */

        if (match[best_len]   != scan_end  ||
            match[best_len-1] != scan_end1 ||
            *match            != *scan     ||
            *++match          != scan[1])      continue;

        /* The check at best_len-1 can be removed because it will be made
         * again later. (This heuristic is not always a win.)
         * It is not necessary to compare scan[2] and match[2] since they
         * are always equal when the other bytes match, given that
         * the hash keys are equal and that HASH_BITS >= 8.
         */
        scan += 2, match++;
        Assert(*scan == *match, "match[2]?");

        /* We check for insufficient lookahead only every 8th comparison;
         * the 256th check will be made at strstart+258.
         */
        do {
        } while (*++scan == *++match && *++scan == *++match &&
                 *++scan == *++match && *++scan == *++match &&
                 *++scan == *++match && *++scan == *++match &&
                 *++scan == *++match && *++scan == *++match &&
                 scan < strend);

        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");

        len = MAX_MATCH - (int)(strend - scan);
        scan = strend - MAX_MATCH;

#endif /* UNALIGNED_OK */

        if (len > best_len) {
            s->match_start = cur_match;
            best_len = len;
            if (len >= nice_match) break;
#ifdef UNALIGNED_OK
            scan_end = *(ushf*)(scan+best_len-1);
#else
            scan_end1  = scan[best_len-1];
            scan_end   = scan[best_len];
#endif
        }
    } while ((cur_match = prev[cur_match & wmask]) > limit
             && --chain_length != 0);

    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
    return s->lookahead;
}
#endif /* ASMV */
#endif /* FASTEST */

/* ---------------------------------------------------------------------------
 * Optimized version for level == 1 or strategy == Z_RLE only
 */
local uInt longest_match_fast(s, cur_match)
    deflate_state *s;
    IPos cur_match;                             /* current match */
{
    register Bytef *scan = s->window + s->strstart; /* current string */
    register Bytef *match;                       /* matched string */
    register int len;                           /* length of current match */
    register Bytef *strend = s->window + s->strstart + MAX_MATCH;

    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
     * It is easy to get rid of this optimization if necessary.
     */
    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");

    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");

    Assert(cur_match < s->strstart, "no future");

    match = s->window + cur_match;

    /* Return failure if the match length is less than 2:
     */
    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;

    /* The check at best_len-1 can be removed because it will be made
     * again later. (This heuristic is not always a win.)
     * It is not necessary to compare scan[2] and match[2] since they
     * are always equal when the other bytes match, given that
     * the hash keys are equal and that HASH_BITS >= 8.
     */
    scan += 2, match += 2;
    Assert(*scan == *match, "match[2]?");

    /* We check for insufficient lookahead only every 8th comparison;
     * the 256th check will be made at strstart+258.
     */
    do {
    } while (*++scan == *++match && *++scan == *++match &&
             *++scan == *++match && *++scan == *++match &&
             *++scan == *++match && *++scan == *++match &&
             *++scan == *++match && *++scan == *++match &&
             scan < strend);

    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");

    len = MAX_MATCH - (int)(strend - scan);

    if (len < MIN_MATCH) return MIN_MATCH - 1;

    s->match_start = cur_match;
    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
}

#ifdef DEBUG
/* ===========================================================================
 * Check that the match at match_start is indeed a match.
 */
local void check_match(s, start, match, length)
    deflate_state *s;
    IPos start, match;
    int length;
{
    /* check that the match is indeed a match */
    if (zmemcmp(s->window + match,
                s->window + start, length) != EQUAL) {
        fprintf(stderr, " start %u, match %u, length %d\n",
                start, match, length);
        do {
            fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
        } while (--length != 0);
        z_error("invalid match");
    }
    if (z_verbose > 1) {
        fprintf(stderr,"\\[%d,%d]", start-match, length);
        do { putc(s->window[start++], stderr); } while (--length != 0);
    }
}
#else
#  define check_match(s, start, match, length)
#endif /* DEBUG */

/* ===========================================================================
 * Fill the window when the lookahead becomes insufficient.
 * Updates strstart and lookahead.
 *
 * IN assertion: lookahead < MIN_LOOKAHEAD
 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
 *    At least one byte has been read, or avail_in == 0; reads are
 *    performed for at least two bytes (required for the zip translate_eol
 *    option -- not supported here).
 */
local void fill_window(s)
    deflate_state *s;
{
    register unsigned n, m;
    register Posf *p;
    unsigned more;    /* Amount of free space at the end of the window. */
    uInt wsize = s->w_size;

    do {
        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);

        /* Deal with !@#$% 64K limit: */
        if (sizeof(int) <= 2) {
            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
                more = wsize;

            } else if (more == (unsigned)(-1)) {
                /* Very unlikely, but possible on 16 bit machine if
                 * strstart == 0 && lookahead == 1 (input done a byte at time)
                 */
                more--;
            }
        }

        /* If the window is almost full and there is insufficient lookahead,
         * move the upper half to the lower one to make room in the upper half.
         */
        if (s->strstart >= wsize+MAX_DIST(s)) {

            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
            s->match_start -= wsize;
            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
            s->block_start -= (long) wsize;

            /* Slide the hash table (could be avoided with 32 bit values

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品一卡两卡| 亚洲欧美日韩综合aⅴ视频| 欧美日韩精品欧美日韩精品| 国产精品亚洲专一区二区三区| 香蕉久久夜色精品国产使用方法| 中文字幕制服丝袜一区二区三区| 精品少妇一区二区三区| 制服丝袜亚洲播放| 欧美日韩国产精选| 欧美日韩国产成人在线91| 欧美亚洲一区三区| 欧美伊人久久久久久午夜久久久久| 国产精品亚洲а∨天堂免在线| 久久66热偷产精品| 蜜臀av一区二区在线免费观看| 日本午夜精品一区二区三区电影 | 欧美aaa在线| 欧美a级一区二区| 免费在线观看精品| 精品综合免费视频观看| 国产综合色产在线精品| 国产精品一区二区免费不卡 | 精品1区2区在线观看| 欧美电影免费观看高清完整版在线 | 99久久综合色| 欧美日韩一区小说| 6080午夜不卡| 国产日产亚洲精品系列| 免费成人结看片| 青娱乐精品视频在线| 国产乱对白刺激视频不卡| 高清av一区二区| 欧美日韩一区精品| 日韩精品在线一区| 国产精品久久久久aaaa樱花 | 欧美喷潮久久久xxxxx| 精品日韩99亚洲| 国产精品久久久爽爽爽麻豆色哟哟 | 在线成人午夜影院| 欧美国产激情一区二区三区蜜月| 亚洲综合在线电影| 国产美女娇喘av呻吟久久| 欧洲人成人精品| 久久伊人蜜桃av一区二区| 国产精品美女久久久久久 | 欧美亚洲国产bt| 欧美精品一区二区三区很污很色的 | 久久这里只有精品视频网| 亚洲视频在线观看一区| 麻豆精品在线播放| 日本高清不卡视频| 久久久精品国产免费观看同学| 亚洲电影第三页| heyzo一本久久综合| 风间由美一区二区三区在线观看 | 日韩精品一区二区三区四区视频| 国产精品三级av在线播放| 亚欧色一区w666天堂| 成人av电影在线观看| 欧美成人乱码一区二区三区| 一区二区三区在线看| 成人免费毛片高清视频| 日韩欧美在线不卡| 亚洲一级二级在线| 色视频欧美一区二区三区| 国产亚洲欧美在线| 日韩美女一区二区三区四区| 婷婷一区二区三区| 在线观看视频一区二区欧美日韩| 中文字幕一区二区三区在线不卡| 极品尤物av久久免费看| 欧美一区二区三区免费大片| 亚洲国产aⅴ天堂久久| 色偷偷一区二区三区| 亚洲视频一区二区在线| gogo大胆日本视频一区| 国产精品入口麻豆九色| 成人av综合一区| 久久久国际精品| 国产精品综合视频| 久久九九全国免费| 国产91精品免费| 自拍视频在线观看一区二区| 99视频在线观看一区三区| 综合激情网...| 欧美无乱码久久久免费午夜一区| 亚洲伊人色欲综合网| 欧美日韩精品一区二区在线播放| 亚洲一区自拍偷拍| 91精品国产一区二区人妖| 免费欧美高清视频| 国产视频一区二区在线| 国产91精品一区二区麻豆亚洲| 一区在线观看免费| 欧美视频三区在线播放| 另类中文字幕网| 国产精品毛片大码女人| 91成人免费在线| 麻豆视频观看网址久久| 中文字幕欧美日本乱码一线二线| 91蝌蚪porny九色| 亚洲国产成人av网| 久久久久久久免费视频了| va亚洲va日韩不卡在线观看| 亚洲成a人片在线不卡一二三区| 制服丝袜亚洲网站| jlzzjlzz欧美大全| 蜜桃一区二区三区在线| 中文字幕制服丝袜成人av| 制服丝袜中文字幕一区| 99久久国产免费看| 麻豆91精品视频| 亚洲一区二区三区激情| 久久久久久久电影| 欧美男男青年gay1069videost | 国产精品电影院| 91精品一区二区三区久久久久久| jvid福利写真一区二区三区| 蜜桃视频一区二区三区| 一区二区免费在线| 欧美国产在线观看| 精品欧美黑人一区二区三区| 色诱亚洲精品久久久久久| 激情都市一区二区| 日韩va亚洲va欧美va久久| 亚洲综合在线五月| 成人欧美一区二区三区| 久久久久亚洲蜜桃| 欧美电影免费观看完整版| 欧美精品 日韩| 日本精品视频一区二区三区| 国产99久久精品| 黄一区二区三区| 美女高潮久久久| 日本成人中文字幕在线视频 | 欧美天堂亚洲电影院在线播放| 成人永久aaa| 丁香桃色午夜亚洲一区二区三区| 日韩高清一级片| 丝袜美腿一区二区三区| 婷婷久久综合九色国产成人 | 粉嫩aⅴ一区二区三区四区五区| 日韩国产欧美在线播放| 日本欧美肥老太交大片| 日本人妖一区二区| 另类小说视频一区二区| 久久aⅴ国产欧美74aaa| 韩国一区二区在线观看| 国产精品资源在线看| 国产宾馆实践打屁股91| 成人免费高清在线观看| 91视频在线观看免费| 色天天综合久久久久综合片| 欧美在线影院一区二区| 欧美另类久久久品| 日韩免费视频线观看| 久久免费的精品国产v∧| 欧美激情一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 亚洲精品成人精品456| 亚洲主播在线观看| 美洲天堂一区二卡三卡四卡视频| 国产在线视视频有精品| av在线不卡免费看| 欧美日韩一区在线| 久久久久9999亚洲精品| 亚洲欧美国产毛片在线| 日日夜夜精品视频天天综合网| 韩国视频一区二区| 色悠久久久久综合欧美99| 91精品国产91久久久久久一区二区| 精品国产乱码久久久久久1区2区 | 日韩欧美一区中文| 中文字幕国产一区二区| 亚洲va国产va欧美va观看| 国产米奇在线777精品观看| 色嗨嗨av一区二区三区| 日韩一级成人av| 一区二区在线免费观看| 极品少妇xxxx精品少妇| 在线免费观看一区| 日本一区二区三区久久久久久久久不| 一区二区三区在线观看国产| 国内精品在线播放| 欧美日韩五月天| 亚洲欧洲在线观看av| 九九国产精品视频| 欧美日韩免费一区二区三区视频| 国产午夜精品福利| 免费人成网站在线观看欧美高清| 色婷婷综合久色| 国产精品女上位| 国产精品影音先锋| 日韩欧美成人一区| 三级不卡在线观看| 欧美日韩久久一区二区| 亚洲视频中文字幕| 91亚洲永久精品| 中文字幕中文在线不卡住| 国产经典欧美精品|