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

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

?? infback.c

?? 一款最完整的工業(yè)組態(tài)軟源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* infback.c -- inflate using a call-back interface
 * Copyright (C) 1995-2003 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

/*
   This code is largely copied from inflate.c.  Normally either infback.o or
   inflate.o would be linked into an application--not both.  The interface
   with inffast.c is retained so that optimized assembler-coded versions of
   inflate_fast() can be used with either inflate.c or infback.c.
 */

#include "zutil.h"
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"

/* function prototypes */
local void fixedtables OF((struct inflate_state FAR *state));

/*
   strm provides memory allocation functions in zalloc and zfree, or
   Z_NULL to use the library memory allocation functions.

   windowBits is in the range 8..15, and window is a user-supplied
   window and output buffer that is 2**windowBits bytes.
 */
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
z_stream FAR *strm;
int windowBits;
unsigned char FAR *window;
const char *version;
int stream_size;
{
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL || window == Z_NULL ||
        windowBits < 8 || windowBits > 15)
        return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
    }
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
                                               sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (voidpf)state;
    state->wbits = windowBits;
    state->wsize = 1U << windowBits;
    state->window = window;
    state->write = 0;
    state->whave = 0;
    return Z_OK;
}

/*
   Return state with length and distance decoding tables and index sizes set to
   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
   If BUILDFIXED is defined, then instead this routine builds the tables the
   first time it's called, and returns those tables the first time and
   thereafter.  This reduces the size of the code by about 2K bytes, in
   exchange for a little execution time.  However, BUILDFIXED should not be
   used for threaded applications, since the rewriting of the tables and virgin
   may not be thread-safe.
 */
local void fixedtables(state)
struct inflate_state FAR *state;
{
#ifdef BUILDFIXED
    static int virgin = 1;
    static code *lenfix, *distfix;
    static code fixed[544];

    /* build fixed huffman tables if first call (may not be thread safe) */
    if (virgin) {
        unsigned sym, bits;
        static code *next;

        /* literal/length table */
        sym = 0;
        while (sym < 144) state->lens[sym++] = 8;
        while (sym < 256) state->lens[sym++] = 9;
        while (sym < 280) state->lens[sym++] = 7;
        while (sym < 288) state->lens[sym++] = 8;
        next = fixed;
        lenfix = next;
        bits = 9;
        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);

        /* distance table */
        sym = 0;
        while (sym < 32) state->lens[sym++] = 5;
        distfix = next;
        bits = 5;
        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);

        /* do this just once */
        virgin = 0;
    }
#else /* !BUILDFIXED */
#   include "inffixed.h"
#endif /* BUILDFIXED */
    state->lencode = lenfix;
    state->lenbits = 9;
    state->distcode = distfix;
    state->distbits = 5;
}

/* Macros for inflateBack(): */

/* Load returned state from inflate_fast() */
#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)

/* Set state from registers for inflate_fast() */
#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)

/* Assure that some input is available.  If input is requested, but denied,
   then return a Z_BUF_ERROR from inflateBack(). */
#define PULL() \
    do { \
        if (have == 0) { \
            have = in(in_desc, &next); \
            if (have == 0) { \
                next = Z_NULL; \
                ret = Z_BUF_ERROR; \
                goto inf_leave; \
            } \
        } \
    } while (0)

/* Get a byte of input into the bit accumulator, or return from inflateBack()
   with an error if there is no input available. */
#define PULLBYTE() \
    do { \
        PULL(); \
        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 inflateBack() with
   an error. */
#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)

/* Assure that some output space is available, by writing out the window
   if it's full.  If the write fails, return from inflateBack() with a
   Z_BUF_ERROR. */
#define ROOM() \
    do { \
        if (left == 0) { \
            put = state->window; \
            left = state->wsize; \
            state->whave = left; \
            if (out(out_desc, put, left)) { \
                ret = Z_BUF_ERROR; \
                goto inf_leave; \
            } \
        } \
    } while (0)

/*
   strm provides the memory allocation functions and window buffer on input,
   and provides information on the unused input on return.  For Z_DATA_ERROR
   returns, strm will also provide an error message.

   in() and out() are the call-back input and output functions.  When
   inflateBack() needs more input, it calls in().  When inflateBack() has
   filled the window with output, or when it completes with data in the
   window, it calls out() to write out the data.  The application must not
   change the provided input until in() is called again or inflateBack()
   returns.  The application must not change the window/output buffer until
   inflateBack() returns.

   in() and out() are called with a descriptor parameter provided in the
   inflateBack() call.  This parameter can be a structure that provides the
   information required to do the read or write, as well as accumulated
   information on the input and output such as totals and check values.

   in() should return zero on failure.  out() should return non-zero on
   failure.  If either in() or out() fails, than inflateBack() returns a
   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
   was in() or out() that caused in the error.  Otherwise,  inflateBack()
   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
   error, or Z_MEM_ERROR if it could not allocate memory for the state.
   inflateBack() can also return Z_STREAM_ERROR if the input parameters
   are not correct, i.e. strm is Z_NULL or the state was not initialized.
 */
int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
z_stream FAR *strm;
in_func in;
void FAR *in_desc;
out_func out;
void FAR *out_desc;
{
    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 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 */
    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};

    /* Check that the strm exists and that the state was initialized */
    if (strm == Z_NULL || strm->state == Z_NULL)
        return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* Reset the state */
    strm->msg = Z_NULL;
    state->mode = TYPE;
    state->last = 0;
    state->whave = 0;
    next = strm->next_in;
    have = next != Z_NULL ? strm->avail_in : 0;
    hold = 0;
    bits = 0;
    put = state->window;
    left = state->wsize;

    /* Inflate until end of block marked as last */
    for (;;)
        switch (state->mode) {
        case TYPE:
            /* determine and dispatch block type */
            if (state->last) {
                BYTEBITS();
                state->mode = DONE;
                break;
            }
            NEEDBITS(3);
            state->last = BITS(1);
            DROPBITS(1);
            switch (BITS(2)) {
            case 0:                             /* stored block */
                Tracev((stderr, "inflate:     stored block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = STORED;
                break;
            case 1:                             /* fixed block */
                fixedtables(state);
                Tracev((stderr, "inflate:     fixed codes block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = LEN;              /* decode codes */
                break;
            case 2:                             /* dynamic block */
                Tracev((stderr, "inflate:     dynamic codes block%s\n",
                        state->last ? " (last)" : ""));
                state->mode = TABLE;
                break;
            case 3:
                strm->msg = (char *)"invalid block type";

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本精品一级二级| 日韩网站在线看片你懂的| 日本色综合中文字幕| 国产亚洲欧洲一区高清在线观看| 色综合欧美在线视频区| 精品午夜久久福利影院| 亚洲高清免费一级二级三级| 国产色一区二区| 正在播放一区二区| 91欧美激情一区二区三区成人| 欧美aa在线视频| 亚洲精品国产一区二区三区四区在线 | 欧美国产精品中文字幕| 91精品国产91热久久久做人人| av在线播放一区二区三区| 久久国产精品99久久人人澡| 亚洲线精品一区二区三区| 国产精品久久久久久福利一牛影视| 日韩精品中文字幕在线不卡尤物| 欧美在线视频不卡| 成人黄色综合网站| 国产一区二区三区免费| 日韩福利视频网| 亚洲香肠在线观看| 亚洲美女屁股眼交3| 国产蜜臀av在线一区二区三区| 日韩精品一区二区三区swag| 欧美日韩日日摸| 色综合久久综合网| 91在线看国产| 成人app在线| 成人高清免费在线播放| 成人app网站| 国产69精品久久久久毛片 | 欧美日韩精品专区| 一本一道久久a久久精品综合蜜臀| 懂色av噜噜一区二区三区av| 97超碰欧美中文字幕| 国产成人在线观看| 成人在线综合网| eeuss鲁片一区二区三区在线观看| 成人免费不卡视频| 国产91精品在线观看| 国产成人av在线影院| 国产精品综合二区| 国产超碰在线一区| 粉嫩绯色av一区二区在线观看| 国产成人亚洲综合a∨婷婷图片| 国产精品一级在线| 成人国产一区二区三区精品| 99久久婷婷国产综合精品| 99re视频这里只有精品| 99re这里只有精品6| 91成人在线精品| 欧美日韩视频不卡| 欧美一区二区三区啪啪| 日韩欧美国产一区二区三区 | 91免费视频大全| 欧洲精品在线观看| 欧美一区二区三区免费观看视频| 欧美一级片免费看| 久久久久9999亚洲精品| 亚洲欧洲日本在线| 亚洲一区二区三区免费视频| 日本中文在线一区| 国产一区二区91| av不卡在线观看| 欧美亚洲高清一区| 日韩亚洲欧美一区二区三区| 国产日本欧美一区二区| 一区二区三区不卡视频在线观看 | 91美女在线视频| 欧美写真视频网站| 日韩精品最新网址| 国产精品人成在线观看免费| 一区二区三区日本| 国产一区激情在线| 色哟哟精品一区| 欧美电影免费观看高清完整版在| 国产精品理论片| 日韩av一区二区三区四区| 国产一区二区三区电影在线观看| 99精品国产视频| 日韩一区二区麻豆国产| 国产精品不卡一区二区三区| 日韩精品亚洲一区| 成人免费va视频| 91麻豆精品91久久久久久清纯| 国产人成亚洲第一网站在线播放 | 欧美日韩一区视频| 久久综合丝袜日本网| 亚洲女性喷水在线观看一区| 男女视频一区二区| 91视频一区二区三区| 精品国产乱子伦一区| 一区二区三区高清| 懂色av一区二区夜夜嗨| 日韩亚洲欧美在线观看| 一区二区三区欧美亚洲| 成人综合激情网| 欧美成人国产一区二区| 亚洲制服丝袜av| 成人黄色av电影| www国产成人免费观看视频 深夜成人网| 亚洲精品大片www| 成熟亚洲日本毛茸茸凸凹| 日韩免费观看2025年上映的电影| 一区二区三区欧美视频| 99久久婷婷国产| 欧美精品一区二| 日韩中文欧美在线| 色综合天天性综合| 欧美国产一区视频在线观看| 男女视频一区二区| 日本电影欧美片| 国产精品五月天| 久久99久久久久| 欧美人狂配大交3d怪物一区| 日韩理论片一区二区| 国产精品99久久久久久有的能看| 欧美一卡在线观看| 亚洲v中文字幕| 在线观看日韩av先锋影音电影院| 国产精品毛片a∨一区二区三区| 黑人巨大精品欧美黑白配亚洲| 欧美日本在线看| 亚洲国产乱码最新视频| 色综合久久66| 亚洲一区二区影院| 欧美专区亚洲专区| 亚洲综合久久av| 在线视频你懂得一区| 一区二区三区四区在线播放| 日本高清无吗v一区| 亚洲综合免费观看高清完整版在线| 91在线国产福利| 一区二区三区欧美日| 91国产免费观看| 亚洲福利电影网| 在线视频国内自拍亚洲视频| 亚洲尤物在线视频观看| 欧美午夜精品久久久久久孕妇 | 国产成a人亚洲精| 国产日韩欧美一区二区三区乱码| 国产乱色国产精品免费视频| 国产清纯美女被跳蛋高潮一区二区久久w| 国产一区二区三区精品欧美日韩一区二区三区 | 精品久久久久一区| 久久99精品一区二区三区| 久久综合丝袜日本网| 风间由美中文字幕在线看视频国产欧美| 欧美国产精品一区二区三区| 99vv1com这只有精品| 亚洲自拍偷拍麻豆| 欧美一区午夜视频在线观看| 毛片av一区二区三区| 久久久不卡网国产精品二区| 波多野结衣一区二区三区| 中文字幕在线观看一区二区| 日本丰满少妇一区二区三区| 天堂在线亚洲视频| 精品久久久久香蕉网| 成人av综合在线| 亚洲福利视频一区| 亚洲精品一区二区三区99| 粉嫩av亚洲一区二区图片| 国产精品久久久久永久免费观看| 色美美综合视频| 另类成人小视频在线| 欧美国产日韩一二三区| 欧美日韩综合色| 国产剧情一区二区| 一区二区三区美女视频| 日韩欧美色综合网站| k8久久久一区二区三区| 午夜影院在线观看欧美| xnxx国产精品| 欧美三级韩国三级日本三斤 | 国产麻豆精品theporn| 亚洲婷婷综合色高清在线| 日韩欧美一区在线观看| 不卡的av电影| 日韩精品一二三四| 日韩毛片一二三区| 2020国产精品自拍| 欧美日韩免费视频| 国产999精品久久| 日韩av中文字幕一区二区 | 1024成人网| 精品日韩99亚洲| 欧美综合天天夜夜久久| 成人自拍视频在线观看| 琪琪久久久久日韩精品| 中文字幕一区二区视频| 久久这里只有精品6| 欧美日韩高清一区二区三区| 91在线观看一区二区| 狠狠色丁香久久婷婷综| 日韩精品免费专区| 亚洲综合色区另类av|