亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
中文字幕制服丝袜一区二区三区| 日韩综合小视频| 玉米视频成人免费看| 日韩不卡一区二区三区| 国产河南妇女毛片精品久久久| aaa国产一区| 欧美一卡二卡三卡四卡| 欧美国产日本韩| 亚洲va国产天堂va久久en| 国产一区二区三区蝌蚪| 欧洲精品一区二区| 久久综合九色综合97婷婷| 中文字幕五月欧美| 日韩**一区毛片| 99精品视频中文字幕| 精品国产一区二区三区av性色| 亚洲午夜精品在线| 97se亚洲国产综合自在线观| 日韩一级高清毛片| 一区二区三区日韩精品| 国产成人精品一区二| 日韩美女主播在线视频一区二区三区| 亚洲欧美日韩在线不卡| 国产不卡视频在线播放| 精品少妇一区二区三区| 亚洲成人av资源| 欧美在线你懂得| 亚洲资源中文字幕| 欧美午夜寂寞影院| 亚洲国产裸拍裸体视频在线观看乱了| 972aa.com艺术欧美| 国产色产综合色产在线视频 | 亚洲成人你懂的| 欧洲av一区二区嗯嗯嗯啊| 国产精品美女久久久久高潮| 风间由美一区二区av101 | 欧美一区二区三区人| 偷窥国产亚洲免费视频| 欧美吻胸吃奶大尺度电影 | 色婷婷综合久久久中文一区二区| 国产亚洲精品久| 丁香五精品蜜臀久久久久99网站| 精品sm捆绑视频| 国产成人精品免费视频网站| 亚洲国产精品成人综合色在线婷婷| 国产成人免费av在线| 国产精品蜜臀在线观看| av在线一区二区| 国产成人福利片| 亚洲精品一区二区三区99| 激情丁香综合五月| 国产精品理伦片| 色婷婷亚洲婷婷| 日韩和欧美的一区| 日本一区二区电影| 在线欧美一区二区| 日韩avvvv在线播放| 国产日韩亚洲欧美综合| 91网页版在线| 欧美aaaaaa午夜精品| 国产精品午夜在线| 3atv一区二区三区| 成人午夜激情在线| 婷婷国产v国产偷v亚洲高清| 欧美国产日韩精品免费观看| 欧美日本一区二区三区四区| 国产美女在线精品| 天天综合日日夜夜精品| 国产精品成人一区二区三区夜夜夜| 欧美日韩在线三区| 色悠悠久久综合| 国产成人免费在线观看| 男人操女人的视频在线观看欧美| 国产精品久久久久久久久免费相片| 欧美人成免费网站| 在线观看不卡视频| 成人99免费视频| 国产成人自拍网| 国产在线播精品第三| 麻豆久久一区二区| 蜜桃视频在线观看一区二区| 亚洲电影激情视频网站| 一区二区欧美视频| 亚洲女人****多毛耸耸8| 中文字幕欧美区| 久久久久国产精品麻豆| 久久婷婷国产综合精品青草| 日韩免费观看高清完整版 | 91精品国产手机| 91精品国产综合久久久久久漫画 | 欧美电影免费观看完整版| 日韩一区二区高清| 日韩免费观看高清完整版| 久久综合色综合88| 久久久九九九九| 国产精品麻豆视频| 中文字幕在线观看一区| 亚洲乱码中文字幕综合| 亚洲人快播电影网| 香蕉影视欧美成人| 免费看黄色91| 高清日韩电视剧大全免费| 不卡电影免费在线播放一区| 色综合久久88色综合天天| 9191成人精品久久| 国产日本欧洲亚洲| 亚洲小说欧美激情另类| 韩国精品主播一区二区在线观看| 国产成+人+日韩+欧美+亚洲 | 日韩欧美在线网站| 日本一区二区三区四区在线视频 | 欧美美女视频在线观看| 久久久久青草大香线综合精品| 亚洲天堂免费看| 伊人婷婷欧美激情| 精品影视av免费| 99久久精品国产网站| 欧美伦理电影网| 国产精品成人在线观看| 开心九九激情九九欧美日韩精美视频电影 | 狠狠色综合日日| 欧美在线视频不卡| 欧美精品一区二| 亚洲成精国产精品女| 成人av网站在线| 精品sm在线观看| 日本三级亚洲精品| 在线精品观看国产| 亚洲国产高清在线观看视频| 青青草97国产精品免费观看| 91视频免费播放| 国产日韩欧美精品一区| 日本强好片久久久久久aaa| 国产欧美一区二区在线观看| 蜜桃免费网站一区二区三区| 欧美偷拍一区二区| 最新欧美精品一区二区三区| 国产一区二区三区在线观看免费| 欧美日本高清视频在线观看| 亚洲美女在线一区| 99热国产精品| 中文字幕在线视频一区| 国产ts人妖一区二区| 久久久久久久精| 国产福利电影一区二区三区| www亚洲一区| 成人综合婷婷国产精品久久免费| 久久精品一区二区三区不卡| 国产成人免费视频网站高清观看视频 | 一区二区欧美在线观看| 色国产综合视频| 午夜国产精品一区| 717成人午夜免费福利电影| 日韩va亚洲va欧美va久久| 欧美一区二区三区视频免费| 日本成人在线不卡视频| 精品卡一卡二卡三卡四在线| 国产最新精品精品你懂的| 国产欧美视频在线观看| 欧美精品一区二区精品网| 国产91清纯白嫩初高中在线观看| 国产日本欧美一区二区| 色综合久久天天| 天堂蜜桃91精品| 欧美激情一区二区三区四区| 色欧美片视频在线观看| 亚洲超碰精品一区二区| 精品粉嫩aⅴ一区二区三区四区| 国产一区二区三区黄视频 | 精品视频资源站| 国产成人av资源| 亚洲尤物视频在线| 337p日本欧洲亚洲大胆精品| 色婷婷av一区二区三区大白胸| 日本伊人色综合网| 国产精品麻豆视频| 日韩欧美国产综合一区| 91视频在线看| 国产丶欧美丶日本不卡视频| 日韩中文字幕亚洲一区二区va在线| 26uuu亚洲综合色| 欧美日韩免费不卡视频一区二区三区 | 国产精品美女久久久久av爽李琼 | 欧美在线一二三| 色婷婷综合中文久久一本| 丁香六月综合激情| 国内精品免费在线观看| 婷婷开心激情综合| 一区二区免费在线| 国产欧美一区视频| 久久众筹精品私拍模特| 久久精品国产一区二区三| 久久―日本道色综合久久| 精品成人在线观看| 国产精品国产三级国产aⅴ中文| 夜夜精品视频一区二区| 亚洲不卡一区二区三区| 亚洲国产中文字幕| 日韩电影在线一区| 国产一区在线观看视频|