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

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

?? inflate.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:

    /* if window not in use yet, initialize */
    if (state->wsize == 0) {
        state->wsize = 1U << state->wbits;
        state->write = 0;
        state->whave = 0;
    }

    /* copy state->wsize or less output bytes into the circular window */
    copy = out - strm->avail_out;
    if (copy >= state->wsize) {
        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
        state->write = 0;
        state->whave = state->wsize;
    }
    else {
        dist = state->wsize - state->write;
        if (dist > copy) dist = copy;
        zmemcpy(state->window + state->write, strm->next_out - copy, dist);
        copy -= dist;
        if (copy) {
            zmemcpy(state->window, strm->next_out - copy, copy);
            state->write = copy;
            state->whave = state->wsize;
        }
        else {
            state->write += dist;
            if (state->write == state->wsize) state->write = 0;
            if (state->whave < state->wsize) state->whave += dist;
        }
    }
    return 0;
}

/* Macros for inflate(): */

/* check function to use adler32() for zlib or crc32() for gzip */
#ifdef GUNZIP
#  define UPDATE(check, buf, len) \
    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
#else
#  define UPDATE(check, buf, len) adler32(check, buf, len)
#endif

/* check macros for header crc */
#ifdef GUNZIP
#  define CRC2(check, word) \
    do { \
        hbuf[0] = (unsigned char)(word); \
        hbuf[1] = (unsigned char)((word) >> 8); \
        check = crc32(check, hbuf, 2); \
    } while (0)

#  define CRC4(check, word) \
    do { \
        hbuf[0] = (unsigned char)(word); \
        hbuf[1] = (unsigned char)((word) >> 8); \
        hbuf[2] = (unsigned char)((word) >> 16); \
        hbuf[3] = (unsigned char)((word) >> 24); \
        check = crc32(check, hbuf, 4); \
    } while (0)
#endif

/* Load registers with state in inflate() for speed */
#define LOAD() \
    do { \
        put = strm->next_out; \
        left = strm->avail_out; \
        next = strm->next_in; \
        have = strm->avail_in; \
        hold = state->hold; \
        bits = state->bits; \
    } while (0)

/* Restore state from registers in inflate() */
#define RESTORE() \
    do { \
        strm->next_out = put; \
        strm->avail_out = left; \
        strm->next_in = next; \
        strm->avail_in = have; \
        state->hold = hold; \
        state->bits = bits; \
    } while (0)

/* Clear the input bit accumulator */
#define INITBITS() \
    do { \
        hold = 0; \
        bits = 0; \
    } while (0)

/* Get a byte of input into the bit accumulator, or return from inflate()
   if there is no input available. */
#define PULLBYTE() \
    do { \
        if (have == 0) goto inf_leave; \
        have--; \
        hold += (unsigned long)(*next++) << bits; \
        bits += 8; \
    } while (0)

/* Assure that there are at least n bits in the bit accumulator.  If there is
   not enough available input to do that, then return from inflate(). */
#define NEEDBITS(n) \
    do { \
        while (bits < (unsigned)(n)) \
            PULLBYTE(); \
    } while (0)

/* Return the low n bits of the bit accumulator (n < 16) */
#define BITS(n) \
    ((unsigned)hold & ((1U << (n)) - 1))

/* Remove n bits from the bit accumulator */
#define DROPBITS(n) \
    do { \
        hold >>= (n); \
        bits -= (unsigned)(n); \
    } while (0)

/* Remove zero to seven bits as needed to go to a byte boundary */
#define BYTEBITS() \
    do { \
        hold >>= bits & 7; \
        bits -= bits & 7; \
    } while (0)

/* Reverse the bytes in a 32-bit value */
#define REVERSE(q) \
    ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
     (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))

/*
   inflate() uses a state machine to process as much input data and generate as
   much output data as possible before returning.  The state machine is
   structured roughly as follows:

    for (;;) switch (state) {
    ...
    case STATEn:
        if (not enough input data or output space to make progress)
            return;
        ... make progress ...
        state = STATEm;
        break;
    ...
    }

   so when inflate() is called again, the same case is attempted again, and
   if the appropriate resources are provided, the machine proceeds to the
   next state.  The NEEDBITS() macro is usually the way the state evaluates
   whether it can proceed or should return.  NEEDBITS() does the return if
   the requested bits are not available.  The typical use of the BITS macros
   is:

        NEEDBITS(n);
        ... do something with BITS(n) ...
        DROPBITS(n);

   where NEEDBITS(n) either returns from inflate() if there isn't enough
   input left to load n bits into the accumulator, or it continues.  BITS(n)
   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
   the low n bits off the accumulator.  INITBITS() clears the accumulator
   and sets the number of available bits to zero.  BYTEBITS() discards just
   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.

   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
   if there is no input available.  The decoding of variable length codes uses
   PULLBYTE() directly in order to pull just enough bytes to decode the next
   code, and no more.

   Some states loop until they get enough input, making sure that enough
   state information is maintained to continue the loop where it left off
   if NEEDBITS() returns in the loop.  For example, want, need, and keep
   would all have to actually be part of the saved state in case NEEDBITS()
   returns:

    case STATEw:
        while (want < need) {
            NEEDBITS(n);
            keep[want++] = BITS(n);
            DROPBITS(n);
        }
        state = STATEx;
    case STATEx:

   As shown above, if the next state is also the next case, then the break
   is omitted.

   A state may also return if there is not enough output space available to
   complete that state.  Those states are copying stored data, writing a
   literal byte, and copying a matching string.

   When returning, a "goto inf_leave" is used to update the total counters,
   update the check value, and determine whether any progress has been made
   during that inflate() call in order to return the proper return code.
   Progress is defined as a change in either strm->avail_in or strm->avail_out.
   When there is a window, goto inf_leave will update the window with the last
   output written.  If a goto inf_leave occurs in the middle of decompression
   and there is no window currently, goto inf_leave will create one and copy
   output to the window for the next call of inflate().

   In this implementation, the flush parameter of inflate() only affects the
   return code (per zlib.h).  inflate() always writes as much as possible to
   strm->next_out, given the space available and the provided input--the effect
   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
   the allocation of and copying into a sliding window until necessary, which
   provides the effect documented in zlib.h for Z_FINISH when the entire input
   stream available.  So the only thing the flush parameter actually does is:
   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
   will return Z_BUF_ERROR if it has not reached the end of the stream.
 */

int ZEXPORT inflate(strm, flush)
z_streamp strm;
int flush;
{
    struct inflate_state FAR *state;
    unsigned char FAR *next;    /* next input */
    unsigned char FAR *put;     /* next output */
    unsigned have, left;        /* available input and output */
    unsigned long hold;         /* bit buffer */
    unsigned bits;              /* bits in bit buffer */
    unsigned in, out;           /* save starting available input and output */
    unsigned copy;              /* number of stored or match bytes to copy */
    unsigned char FAR *from;    /* where to copy match bytes from */
    code this;                  /* current decoding table entry */
    code last;                  /* parent table entry */
    unsigned len;               /* length to copy for repeats, bits to drop */
    int ret;                    /* return code */
#ifdef GUNZIP
    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
#endif
    static const unsigned short order[19] = /* permutation of code lengths */
        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};

    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
        (strm->next_in == Z_NULL && strm->avail_in != 0))
        return Z_STREAM_ERROR;

    state = (struct inflate_state FAR *)strm->state;
    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
    LOAD();
    in = have;
    out = left;
    ret = Z_OK;
    for (;;)
        switch (state->mode) {
        case HEAD:
            if (state->wrap == 0) {
                state->mode = TYPEDO;
                break;
            }
            NEEDBITS(16);
#ifdef GUNZIP
            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
                state->check = crc32(0L, Z_NULL, 0);
                CRC2(state->check, hold);
                INITBITS();
                state->mode = FLAGS;
                break;
            }
            state->flags = 0;           /* expect zlib header */
            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
#else
            if (
#endif
                ((BITS(8) << 8) + (hold >> 8)) % 31) {
                strm->msg = (char *)"incorrect header check";
                state->mode = BAD;
                break;
            }
            if (BITS(4) != Z_DEFLATED) {
                strm->msg = (char *)"unknown compression method";
                state->mode = BAD;
                break;
            }
            DROPBITS(4);
            if (BITS(4) + 8 > state->wbits) {
                strm->msg = (char *)"invalid window size";
                state->mode = BAD;
                break;
            }
            Tracev((stderr, "inflate:   zlib header ok\n"));
            strm->adler = state->check = adler32(0L, Z_NULL, 0);
            state->mode = hold & 0x200 ? DICTID : TYPE;
            INITBITS();
            break;
#ifdef GUNZIP
        case FLAGS:
            NEEDBITS(16);
            state->flags = (int)(hold);
            if ((state->flags & 0xff) != Z_DEFLATED) {
                strm->msg = (char *)"unknown compression method";
                state->mode = BAD;
                break;
            }
            if (state->flags & 0xe000) {
                strm->msg = (char *)"unknown header flags set";
                state->mode = BAD;
                break;
            }
            if (state->flags & 0x0200) CRC2(state->check, hold);
            INITBITS();
            state->mode = TIME;
        case TIME:
            NEEDBITS(32);
            if (state->flags & 0x0200) CRC4(state->check, hold);
            INITBITS();
            state->mode = OS;
        case OS:
            NEEDBITS(16);
            if (state->flags & 0x0200) CRC2(state->check, hold);
            INITBITS();
            state->mode = EXLEN;
        case EXLEN:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美电影免费提供在线观看| 色综合天天综合网天天狠天天| 欧美理论片在线| 天天操天天干天天综合网| 欧美精品一二三| 久久国产精品无码网站| 国产网站一区二区| 99久久精品国产精品久久| 一区二区三区欧美在线观看| 欧美高清精品3d| 精品一区二区在线观看| 国产精品理伦片| 欧美裸体一区二区三区| 国产精品一级片在线观看| 国产精品的网站| 欧美性大战久久久| 国产呦萝稀缺另类资源| 亚洲欧美偷拍卡通变态| 日韩午夜精品电影| 99视频在线观看一区三区| 图片区小说区区亚洲影院| 精品国产1区2区3区| 99久久婷婷国产| 奇米777欧美一区二区| 中文字幕av在线一区二区三区| 在线一区二区三区四区| 麻豆中文一区二区| 一区二区三区免费看视频| 日韩欧美一区中文| 91麻豆国产福利在线观看| 免费观看一级欧美片| 中文字幕一区av| 日韩欧美一区二区免费| 色综合一个色综合| 国产精品一区二区你懂的| 亚洲无人区一区| 久久久精品天堂| 欧美夫妻性生活| 99久久国产综合精品麻豆| 精品一区二区在线看| 亚洲一区二区三区视频在线播放| 久久精品夜色噜噜亚洲a∨| 欧美日韩国产高清一区二区| 不卡一二三区首页| 久久av老司机精品网站导航| 亚洲一区二区三区中文字幕 | 亚洲午夜激情av| 国产欧美中文在线| 欧美电影免费观看高清完整版在线观看 | 波多野结衣精品在线| 裸体一区二区三区| 亚洲国产日韩a在线播放性色| 久久久久久久久99精品| 欧美一级日韩免费不卡| 欧美性高清videossexo| 91亚洲精品一区二区乱码| 国产成人啪免费观看软件| 免费观看日韩av| 久久精品国产免费看久久精品| 亚洲福利电影网| 一区二区三区在线影院| 国产精品―色哟哟| 国产亚洲va综合人人澡精品| 精品欧美乱码久久久久久1区2区 | 91精品国产福利在线观看| 色综合久久中文字幕综合网| av色综合久久天堂av综合| 成人一区二区三区视频| 国产精品伊人色| 韩国一区二区在线观看| 精品亚洲欧美一区| 经典三级在线一区| 狠狠色狠狠色综合日日91app| 青青草成人在线观看| 无吗不卡中文字幕| 视频一区中文字幕| 日韩高清国产一区在线| 青青草一区二区三区| 麻豆精品一区二区av白丝在线| 美腿丝袜一区二区三区| 毛片av一区二区三区| 国产在线一区二区综合免费视频| 黑人巨大精品欧美黑白配亚洲| 激情综合五月婷婷| 国产麻豆精品一区二区| 成人精品鲁一区一区二区| 99精品久久只有精品| 91久久一区二区| 欧美日韩精品一区二区三区蜜桃| 91精品国产欧美日韩| 欧美成人精品二区三区99精品| 精品欧美乱码久久久久久1区2区| 国产亚洲一区二区在线观看| 中文字幕一区二区三区不卡在线| 亚洲色欲色欲www| 日韩精品国产精品| 国产在线播精品第三| 91蜜桃传媒精品久久久一区二区| 欧洲在线/亚洲| 欧美一级理论片| 国产精品欧美一级免费| 一区二区三区丝袜| 另类小说欧美激情| 不卡一二三区首页| 欧美一区三区四区| 国产精品嫩草影院av蜜臀| 亚洲国产精品一区二区久久 | 国产精品久久久久久久久免费丝袜| 亚洲欧美一区二区久久| 免费欧美日韩国产三级电影| 国产大片一区二区| 欧美亚洲愉拍一区二区| 精品久久国产老人久久综合| 中文字幕一区在线观看视频| 日韩和欧美的一区| 成人免费高清在线| 欧美一区二区女人| 国产精品久久久久久久久晋中 | 欧美在线制服丝袜| 久久久三级国产网站| 一区二区激情视频| 国产一区不卡视频| 欧美日本在线一区| 国产精品天干天干在线综合| 日韩中文字幕区一区有砖一区 | 福利一区二区在线| 欧美精品第1页| 国产精品久久精品日日| 日本欧美在线看| 色综合久久中文字幕| 国产午夜精品美女毛片视频| 视频一区欧美精品| www.亚洲在线| 久久欧美一区二区| 秋霞成人午夜伦在线观看| 在线欧美小视频| 国产精品入口麻豆九色| 久久99精品久久久久久久久久久久| 色综合天天视频在线观看 | 精品福利视频一区二区三区| 亚洲v中文字幕| 色婷婷av一区二区三区之一色屋| 国产清纯在线一区二区www| 另类的小说在线视频另类成人小视频在线| 色综合久久天天| 国产精品全国免费观看高清 | 99综合电影在线视频| 久久综合久久综合久久综合| 奇米四色…亚洲| 欧美日韩亚州综合| 亚洲夂夂婷婷色拍ww47| www.日韩大片| 国产精品欧美一区喷水| 国产91在线观看| 久久综合资源网| 国产乱人伦精品一区二区在线观看 | 天天爽夜夜爽夜夜爽精品视频| 91一区二区三区在线观看| 国产精品日韩精品欧美在线| 成人午夜看片网址| 国产精品麻豆久久久| 丁香一区二区三区| 中文字幕不卡在线| 99久免费精品视频在线观看| 国产精品嫩草影院com| 99麻豆久久久国产精品免费优播| 国产精品久久久久久亚洲伦| 99国内精品久久| 亚洲欧美电影一区二区| 日本道色综合久久| 亚洲电影在线播放| 欧美福利电影网| 精品夜夜嗨av一区二区三区| 久久精品水蜜桃av综合天堂| 国产91高潮流白浆在线麻豆| 国产精品久久久久久久岛一牛影视| 成人av资源站| 亚洲综合一二区| 欧美一区二区三区不卡| 久久99久国产精品黄毛片色诱| 欧美精品一区二区久久久| 国产成人av电影免费在线观看| 国产精品成人在线观看| 欧美性极品少妇| 九九久久精品视频| 欧美激情在线看| 欧美在线观看一区二区| 免费国产亚洲视频| 中文一区在线播放| 欧美做爰猛烈大尺度电影无法无天| 亚洲国产另类av| 欧美成人性福生活免费看| 国产不卡视频一区| 一区二区三区鲁丝不卡| 91精品国产综合久久小美女 | 成人激情免费视频| 亚洲国产精品久久久男人的天堂| 欧美一区二区日韩| 东方aⅴ免费观看久久av| 亚洲国产成人porn|