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

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

?? infback.c

?? SDL文件。SDL_ERROwenjian.....
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* infback.c -- inflate using a call-back interface
 * Copyright (C) 1995-2005 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_streamp 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 = (struct internal_state FAR *)state;
    state->dmax = 32768U;
    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_streamp 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";
                state->mode = BAD;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91成人国产精品| 97国产一区二区| 日韩av电影天堂| 午夜欧美大尺度福利影院在线看| 中文字幕佐山爱一区二区免费| 久久精品夜夜夜夜久久| 欧美激情综合在线| 国产精品国产馆在线真实露脸| 自拍偷拍亚洲欧美日韩| 一区二区三区四区乱视频| 一区二区三区国产精华| 亚洲午夜精品一区二区三区他趣| 一区二区三区产品免费精品久久75| 亚洲另类色综合网站| 亚洲图片一区二区| 美女网站色91| 高清不卡一区二区| 日本久久电影网| 欧美一区二区三区视频免费| 日韩小视频在线观看专区| 久久久五月婷婷| 国产精品久久久久久一区二区三区| 日韩理论片一区二区| 亚洲成人精品在线观看| 美国毛片一区二区三区| 国产福利不卡视频| 一本久久a久久精品亚洲| 777午夜精品视频在线播放| 久久婷婷国产综合精品青草| 中文一区二区完整视频在线观看| 亚洲精品日韩一| 免费成人在线播放| av一区二区不卡| 91精品婷婷国产综合久久性色| 国产亚洲一二三区| 午夜亚洲国产au精品一区二区| 国产精品自在在线| 91.麻豆视频| 亚洲色欲色欲www| 美女国产一区二区三区| 色综合中文字幕国产 | 精品日韩av一区二区| 国产欧美日韩不卡| 日韩精品五月天| 色综合久久88色综合天天免费| 精品国产免费一区二区三区四区 | 日韩国产欧美在线观看| 国产99久久久国产精品潘金| 欧美日韩aaaaa| 亚洲欧美日本韩国| 丁香六月综合激情| 日韩丝袜美女视频| 亚洲成av人片在线| 91黄色免费版| 亚洲日本乱码在线观看| 国内精品国产成人国产三级粉色| 在线观看日韩精品| 国产精品免费视频一区| 国产剧情一区二区| 精品日韩在线一区| 奇米影视7777精品一区二区| 欧美日韩国产首页在线观看| 亚洲乱码日产精品bd| 成人ar影院免费观看视频| 久久久久久久精| 国产精品亚洲一区二区三区在线| 日韩精品一区二区三区中文精品| 亚洲va天堂va国产va久| 欧美日韩精品一二三区| 亚洲国产视频一区| 欧美午夜精品一区二区三区| 亚洲色图20p| 在线观看国产一区二区| 一区二区三区在线观看网站| 欧美在线你懂的| 日本在线观看不卡视频| 日韩欧美国产综合在线一区二区三区| 琪琪久久久久日韩精品| 欧美一区二区免费视频| 久久99日本精品| 久久精品亚洲国产奇米99| 国产一区二区三区黄视频| 国产欧美va欧美不卡在线| 久久超碰97中文字幕| 亚洲精品一区二区在线观看| 国产成人精品免费看| 国产精品色婷婷久久58| 不卡视频免费播放| 亚洲一区二三区| 日韩欧美另类在线| 国产91精品在线观看| 1024精品合集| 91精品欧美久久久久久动漫| 激情五月激情综合网| 2024国产精品| 国产999精品久久久久久绿帽| 中文字幕一区在线观看视频| 欧美色网一区二区| 国产乱码字幕精品高清av| 亚洲色图一区二区| 日韩亚洲欧美一区二区三区| 国产成人精品一区二区三区四区| 成人欧美一区二区三区1314| 精品视频一区二区不卡| 国产在线视视频有精品| 亚洲图片另类小说| 欧美成人精品3d动漫h| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产宾馆实践打屁股91| 亚洲综合精品自拍| 91精品国产综合久久久久久久久久| 久99久精品视频免费观看| 亚洲日本电影在线| 欧美变态凌虐bdsm| 欧美日韩视频专区在线播放| 国产成人免费视频| 日本欧洲一区二区| 亚洲精选免费视频| 国产欧美日韩久久| 欧美精品久久一区二区三区 | 国产精品毛片无遮挡高清| 欧洲激情一区二区| 国产成人亚洲综合a∨猫咪| 无吗不卡中文字幕| 亚洲免费高清视频在线| 国产日产欧产精品推荐色| 欧美一区二区三区视频在线观看| 99久久99久久综合| 国产成人综合精品三级| 美女视频第一区二区三区免费观看网站| 中文字幕中文字幕一区二区| 精品成人佐山爱一区二区| 欧美日韩国产综合草草| 色久优优欧美色久优优| 成人国产亚洲欧美成人综合网| 美女久久久精品| 免费成人在线播放| 日韩一区精品视频| 日韩国产一二三区| 午夜精彩视频在线观看不卡| 亚洲黄色免费电影| 一区二区三区精品视频| 亚洲免费视频中文字幕| 国产精品乱人伦中文| 国产精品午夜电影| 国产精品入口麻豆原神| 国产精品人成在线观看免费| 国产清纯白嫩初高生在线观看91| 欧美精品一区二区三区一线天视频| 制服丝袜一区二区三区| 91麻豆精品国产自产在线| 欧美日韩国产免费一区二区| 欧美网站大全在线观看| 欧美三级一区二区| 欧美日韩一区不卡| 欧美精品 日韩| 日韩欧美不卡一区| 久久久久九九视频| 国产精品私人影院| 亚洲视频一二三| 亚洲国产美女搞黄色| 性做久久久久久久免费看| 日韩中文字幕不卡| 国产麻豆欧美日韩一区| 成人视屏免费看| 欧美日韩中文国产| 精品国产麻豆免费人成网站| 国产欧美综合在线观看第十页 | 亚洲国产精品久久人人爱| 亚洲最大成人网4388xx| 三级精品在线观看| 激情伊人五月天久久综合| 成人污污视频在线观看| 在线一区二区三区四区五区| 88在线观看91蜜桃国自产| 久久久亚洲午夜电影| 亚洲欧洲日产国码二区| 香港成人在线视频| 国产不卡视频一区| 在线观看视频91| 国产亚洲欧美日韩俺去了| 一区二区三区中文在线观看| 青青草原综合久久大伊人精品 | 91亚洲精品乱码久久久久久蜜桃| 欧洲另类一二三四区| 久久综合视频网| 亚洲黄色av一区| 国产不卡高清在线观看视频| 欧美日韩免费观看一区二区三区| 精品国产在天天线2019| 成人欧美一区二区三区视频网页 | 亚洲欧美二区三区| 国产一区二区免费在线| 欧美日韩综合在线免费观看| 欧美国产日本视频| 日本va欧美va欧美va精品| 成人av免费网站| 欧美电影免费提供在线观看| 亚洲综合男人的天堂| 成人性生交大片免费|