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

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

?? infback.c

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? 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精品国产福利在线观看 | 男人的j进女人的j一区| 国产精品视频免费| 久久女同互慰一区二区三区| 日韩欧美激情在线| 久久夜色精品国产噜噜av| 日韩欧美一区中文| 欧美一级理论片| 日韩欧美高清在线| 精品福利在线导航| 久久精品夜色噜噜亚洲aⅴ| 久久久精品国产免大香伊| 国产精品视频观看| 亚洲六月丁香色婷婷综合久久| 亚洲人亚洲人成电影网站色| 1024亚洲合集| 亚洲午夜久久久久久久久电影院 | 国产精品欧美经典| 一区二区三区欧美在线观看| 亚洲一区二区三区激情| 日本人妖一区二区| 久久国产剧场电影| 99久久99久久精品免费观看| 91传媒视频在线播放| 3d成人动漫网站| 久久久精品中文字幕麻豆发布| 欧美激情自拍偷拍| 亚洲国产日韩综合久久精品| 久久99精品久久只有精品| 国产高清不卡二三区| 91免费视频大全| 欧美一区二区精品| 亚洲美女精品一区| 久久99国产精品成人| 99精品视频中文字幕| 日韩色视频在线观看| 中文字幕中文字幕一区| 亚洲成av人**亚洲成av**| 国产精品一区二区三区乱码| 色999日韩国产欧美一区二区| 精品美女在线播放| 亚洲黄色小视频| 人人爽香蕉精品| 99国产精品久久| 欧美r级在线观看| 亚洲一区在线观看网站| 亚洲一区在线看| 成人avav影音| www欧美成人18+| 亚洲国产综合色| 成人18视频在线播放| 欧美va亚洲va| 首页国产丝袜综合| 日本黄色一区二区| 欧美国产激情二区三区| 久久99热这里只有精品| 欧美日本一区二区三区| 亚洲人成在线播放网站岛国| 国产精品888| 欧美成人一区二区三区片免费| 亚洲国产欧美另类丝袜| 99国产精品久| 亚洲乱码国产乱码精品精98午夜| 国产精品自产自拍| 久久综合99re88久久爱| 极品少妇一区二区| 日韩欧美色综合| 久久国产精品99精品国产| 欧美一区二区视频网站| 婷婷中文字幕综合| 欧美日韩国产a| 亚洲图片一区二区| 欧美在线观看视频一区二区| 一区二区欧美国产| 91香蕉视频在线| 国产精品久久久久久福利一牛影视 | 国产人妖乱国产精品人妖| 日韩和的一区二区| 欧美一二三四区在线| 人妖欧美一区二区| 精品国产乱码久久久久久影片| 另类综合日韩欧美亚洲| 久久久午夜精品理论片中文字幕| 国产永久精品大片wwwapp| 久久九九全国免费| 91在线看国产| 亚洲成人黄色影院| 日韩欧美一级精品久久| 激情小说欧美图片| 国产精品伦一区| 欧美在线小视频| 秋霞成人午夜伦在线观看| 精品久久一区二区三区| 国产传媒欧美日韩成人| 亚洲欧美综合另类在线卡通| 欧美亚洲免费在线一区| 日本欧美肥老太交大片| 国产欧美日韩三级| 99re6这里只有精品视频在线观看| 亚洲另类在线视频| 欧美一级高清大全免费观看| 国产美女久久久久| 亚洲久草在线视频| 日韩女优毛片在线| 99热在这里有精品免费| 日本欧美一区二区在线观看| 亚洲国产成人午夜在线一区| 欧美伊人精品成人久久综合97 | 久久网这里都是精品| 91在线看国产| 久久99热这里只有精品| 亚洲精品videosex极品| 欧美一区欧美二区| av一区二区三区| 久久超碰97中文字幕| **欧美大码日韩| 欧美不卡在线视频| 欧美色图免费看| 成人动漫一区二区| 精品综合久久久久久8888| 亚洲免费电影在线| 国产农村妇女精品| 日韩欧美国产1| 在线观看av不卡| 成人av网址在线| 韩国v欧美v日本v亚洲v| 午夜视频在线观看一区二区 | 91麻豆精品久久久久蜜臀| 成人精品国产福利| 黄色日韩三级电影| 免费一级欧美片在线观看| 亚洲狠狠爱一区二区三区| 亚洲人精品一区| 国产精品久久久久久久久免费相片| 日韩视频国产视频| 欧美一区欧美二区| 欧美精品v国产精品v日韩精品 | 免费成人性网站| 性做久久久久久免费观看欧美| 中文字幕一区二区三区视频 | 91黄色激情网站| eeuss影院一区二区三区| 国产大陆亚洲精品国产| 久久99热狠狠色一区二区| 日韩av在线发布| 日日欢夜夜爽一区| 午夜精品视频一区| 秋霞成人午夜伦在线观看| 午夜视频在线观看一区二区 | 精品少妇一区二区三区| 欧美精品粉嫩高潮一区二区| 欧美日韩精品三区| 欧美性感一类影片在线播放| 在线免费观看日韩欧美| 在线观看视频一区二区| 在线影院国内精品| 欧美日韩一区视频| 欧美日韩一区二区不卡| 欧美日韩小视频| 欧美一区二区免费观在线| 欧美本精品男人aⅴ天堂| 精品欧美一区二区久久| 欧美精品一区二区三区蜜桃 | 6080日韩午夜伦伦午夜伦| 欧美一级精品在线| 精品噜噜噜噜久久久久久久久试看| 在线综合+亚洲+欧美中文字幕| 日韩亚洲欧美成人一区| 久久午夜国产精品| 中文字幕亚洲不卡| 亚洲主播在线播放| 日本女优在线视频一区二区| 国产一本一道久久香蕉| 99这里都是精品| 欧美精品三级日韩久久| 精品电影一区二区三区| 亚洲欧洲韩国日本视频| 亚洲午夜久久久| 国产一区二区导航在线播放| 成人免费的视频| 欧美中文一区二区三区| 欧美大片在线观看一区| 国产精品免费aⅴ片在线观看| 亚洲一区电影777| 国产米奇在线777精品观看| 99在线热播精品免费| 欧美一级艳片视频免费观看| 欧美高清一级片在线观看| 亚洲高清免费视频| 国产尤物一区二区| 欧美色图天堂网| 中文字幕不卡在线观看| 日韩福利电影在线| 成人精品电影在线观看| 91精品国产综合久久久蜜臀粉嫩| 国产视频在线观看一区二区三区| 亚洲国产中文字幕在线视频综合| 九九九精品视频| 制服视频三区第一页精品| 中文字幕一区二区日韩精品绯色|