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

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

?? deflate.cpp

?? 一個C語言實現的壓縮解壓的工具代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
    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 (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
}

/* ===========================================================================
 * 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.
 */
#ifndef FASTEST
local uInt longest_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;
}

#else /* FASTEST */
/* ---------------------------------------------------------------------------
 * Optimized version for level == 1 only
 */
local uInt longest_match(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 len <= s->lookahead ? len : s->lookahead;
}
#endif /* FASTEST */
#endif /* ASMV */

#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

/* ===========================================================================
 * 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( 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 (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
             * and lookahead == 1 (input done one 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.
         */
        } else 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
               at the expense of memory usage). We slide even when level == 0
               to keep the hash table consistent if we switch back to level > 0
               later. (Using level 0 permanently is not an optimal usage of
               zlib, so we don't care about this pathological case.)
             */
	    n = s->hash_size;
	    p = &s->head[n];
	    do {
		m = *--p;
		*p = (Pos)(m >= wsize ? m-wsize : NIL);
	    } while (--n);

	    n = wsize;
#ifndef FASTEST
	    p = &s->prev[n];
	    do {
		m = *--p;
		*p = (Pos)(m >= wsize ? m-wsize : NIL);
		/* If n is not on any hash chain, prev[n] is garbage but
		 * its value will never be used.
		 */
	    } while (--n);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品免费精品国产| 91麻豆免费观看| 国产91色综合久久免费分享| 成人午夜短视频| 欧美日韩一区视频| 日韩欧美一区中文| 国产精品三级视频| 亚洲国产婷婷综合在线精品| 日韩影视精彩在线| 高清成人在线观看| 欧美性受xxxx黑人xyx性爽| 欧美电视剧在线观看完整版| 国产精品对白交换视频 | 白白色亚洲国产精品| 欧美在线一二三四区| 精品国产三级电影在线观看| ...xxx性欧美| 国精产品一区一区三区mba桃花 | 亚洲电影一级片| 国产精品影音先锋| 欧美男男青年gay1069videost| 久久五月婷婷丁香社区| 亚洲综合小说图片| 男男gaygay亚洲| 99re66热这里只有精品3直播| 91精品国产综合久久精品app| 国产欧美日韩视频一区二区| 亚洲成av人片在线观看无码| 国产成人精品影院| 欧美性生活大片视频| 国产精品视频一二三| 精品一区二区三区不卡| 欧美日韩第一区日日骚| 欧美成人aa大片| 亚洲精品欧美综合四区| 丰满岳乱妇一区二区三区| 婷婷成人激情在线网| 日韩欧美一级二级三级| www.66久久| 在线电影欧美成精品| 国产一区二区久久| 美女国产一区二区| 色偷偷久久人人79超碰人人澡| 国产精品三级在线观看| 97se亚洲国产综合在线| av激情亚洲男人天堂| 国内成人精品2018免费看| www国产精品av| 中文字幕欧美激情| 三级一区在线视频先锋| 麻豆精品在线观看| 日本一区二区三区四区在线视频| 91视频在线观看免费| 亚洲精品久久嫩草网站秘色| 91免费视频网址| 国产99久久久久| www.成人网.com| 成人黄色免费短视频| 国产不卡一区视频| 久久不见久久见免费视频1| 成人免费高清在线| 日本一区二区电影| 国产一区91精品张津瑜| 欧美日韩久久一区二区| 欧美精品xxxxbbbb| 在线不卡中文字幕| 亚洲一区影音先锋| 国产999精品久久久久久绿帽| 国产一区二区三区黄视频| 在线国产亚洲欧美| 国产精品成人免费| 国产伦精一区二区三区| 日韩网站在线看片你懂的| 亚洲欧洲美洲综合色网| 奇米色一区二区| 九色综合狠狠综合久久| 色综合久久久久综合| 日韩欧美国产三级电影视频| 国产精品青草久久| 亚洲18影院在线观看| 日本乱人伦一区| 欧美性色欧美a在线播放| 亚洲三级在线免费观看| 欧美三级视频在线观看| 欧美韩日一区二区三区四区| 婷婷久久综合九色综合伊人色| 成人久久视频在线观看| 欧美一级黄色片| 亚洲国产视频一区| 国产婷婷色一区二区三区在线| 国产成人精品www牛牛影视| 欧美日韩aaaaa| 国产女人水真多18毛片18精品视频| 91视频观看免费| 极品少妇一区二区| 亚洲一区二区三区免费视频| 日本一区二区三区在线观看| 欧美大片顶级少妇| 欧美日韩国产成人在线免费| 99re这里只有精品首页| 国产精品自拍网站| 美洲天堂一区二卡三卡四卡视频| 亚洲免费观看高清完整版在线观看| 欧美大尺度电影在线| 欧美日韩一卡二卡三卡| 成人免费视频网站在线观看| 奇米精品一区二区三区四区| 亚洲国产精品久久久久秋霞影院 | 欧洲精品一区二区三区在线观看| 国产成人av一区| 国精品**一区二区三区在线蜜桃| 久久精品av麻豆的观看方式| 日本aⅴ亚洲精品中文乱码| 性感美女极品91精品| 亚洲一区二区五区| 亚洲国产日韩一级| 亚洲丶国产丶欧美一区二区三区| 亚洲韩国精品一区| 亚洲电影第三页| 日本不卡视频在线| 麻豆精品一区二区综合av| 久久69国产一区二区蜜臀| 国产一区二区调教| 国产一区二区成人久久免费影院 | 国产精品色呦呦| 中文字幕精品一区二区精品绿巨人| 久久只精品国产| 国产日韩精品一区| 成人欧美一区二区三区黑人麻豆| 国产精品毛片高清在线完整版 | 欧美成人bangbros| 国产亚洲精品超碰| 国产精品萝li| 亚洲男人的天堂av| 天天射综合影视| 激情图区综合网| 成人免费视频网站在线观看| 色一情一伦一子一伦一区| 欧美性videosxxxxx| 日韩视频一区在线观看| 久久久久久久国产精品影院| 亚洲欧洲精品一区二区三区| 一区二区国产盗摄色噜噜| 麻豆传媒一区二区三区| 国产ts人妖一区二区| 在线视频亚洲一区| 337p亚洲精品色噜噜噜| 国产亚洲综合av| 亚洲综合精品自拍| 国产曰批免费观看久久久| av不卡在线观看| 欧美一区二视频| 中文字幕一区二区日韩精品绯色| 午夜精品久久久久久久久久| 国产九色精品成人porny| 91福利视频久久久久| 久久综合九色综合97_久久久| 亚洲精品日产精品乱码不卡| 久久精品免费观看| 日本精品一区二区三区高清| 日韩精品一区二| 夜夜操天天操亚洲| 国产精品亚洲综合一区在线观看| 欧美在线啊v一区| 久久久www成人免费毛片麻豆 | 欧美国产乱子伦 | 欧美日韩一区高清| 久久久久亚洲综合| 无码av中文一区二区三区桃花岛| 国产盗摄视频一区二区三区| 91精品91久久久中77777| 国产欧美一区二区三区在线老狼| 午夜精品免费在线| 91国产免费看| 国产精品麻豆久久久| 国产一区二区三区蝌蚪| 日韩一区二区三| 亚洲国产乱码最新视频| 国产黄人亚洲片| 日韩精品一区二区三区四区| 亚洲一区二区视频在线观看| 99re热这里只有精品免费视频| 久久这里只精品最新地址| 视频在线观看91| 91国产精品成人| 一区二区三区四区在线播放| 97久久精品人人做人人爽| 欧美极品aⅴ影院| 精品一区二区在线播放| 日韩视频免费观看高清完整版在线观看| 亚洲国产综合色| 欧美日韩一区二区三区四区| 亚洲最新视频在线观看| 91色乱码一区二区三区| 国产精品久久久久久久午夜片| 国产麻豆日韩欧美久久| 欧美精品一区二区高清在线观看| 日本va欧美va欧美va精品| 日韩欧美成人激情| 久久精品国产亚洲aⅴ|