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

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

?? puff.c

?? 一個(gè)本地database引擎,支持中文T_Sql查詢,兼容DELPHI標(biāo)準(zhǔn)數(shù)據(jù)庫控件
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*
 * puff.c
 * Copyright (C) 2002-2004 Mark Adler
 * For conditions of distribution and use, see copyright notice in puff.h
 * version 1.8, 9 Jan 2004
 *
 * puff.c is a simple inflate written to be an unambiguous way to specify the
 * deflate format.  It is not written for speed but rather simplicity.  As a
 * side benefit, this code might actually be useful when small code is more
 * important than speed, such as bootstrap applications.  For typical deflate
 * data, zlib's inflate() is about four times as fast as puff().  zlib's
 * inflate compiles to around 20K on my machine, whereas puff.c compiles to
 * around 4K on my machine (a PowerPC using GNU cc).  If the faster decode()
 * function here is used, then puff() is only twice as slow as zlib's
 * inflate().
 *
 * All dynamically allocated memory comes from the stack.  The stack required
 * is less than 2K bytes.  This code is compatible with 16-bit int's and
 * assumes that long's are at least 32 bits.  puff.c uses the short data type,
 * assumed to be 16 bits, for arrays in order to to conserve memory.  The code
 * works whether integers are stored big endian or little endian.
 *
 * In the comments below are "Format notes" that describe the inflate process
 * and document some of the less obvious aspects of the format.  This source
 * code is meant to supplement RFC 1951, which formally describes the deflate
 * format:
 *
 *    http://www.zlib.org/rfc-deflate.html
 */

/*
 * Change history:
 *
 * 1.0  10 Feb 2002     - First version
 * 1.1  17 Feb 2002     - Clarifications of some comments and notes
 *                      - Update puff() dest and source pointers on negative
 *                        errors to facilitate debugging deflators
 *                      - Remove longest from struct huffman -- not needed
 *                      - Simplify offs[] index in construct()
 *                      - Add input size and checking, using longjmp() to
 *                        maintain easy readability
 *                      - Use short data type for large arrays
 *                      - Use pointers instead of long to specify source and
 *                        destination sizes to avoid arbitrary 4 GB limits
 * 1.2  17 Mar 2002     - Add faster version of decode(), doubles speed (!),
 *                        but leave simple version for readabilty
 *                      - Make sure invalid distances detected if pointers
 *                        are 16 bits
 *                      - Fix fixed codes table error
 *                      - Provide a scanning mode for determining size of
 *                        uncompressed data
 * 1.3  20 Mar 2002     - Go back to lengths for puff() parameters [Jean-loup]
 *                      - Add a puff.h file for the interface
 *                      - Add braces in puff() for else do [Jean-loup]
 *                      - Use indexes instead of pointers for readability
 * 1.4  31 Mar 2002     - Simplify construct() code set check
 *                      - Fix some comments
 *                      - Add FIXLCODES #define
 * 1.5   6 Apr 2002     - Minor comment fixes
 * 1.6   7 Aug 2002     - Minor format changes
 * 1.7   3 Mar 2003     - Added test code for distribution
 *                      - Added zlib-like license
 * 1.8   9 Jan 2004     - Added some comments on no distance codes case
 */

#include <setjmp.h>             /* for setjmp(), longjmp(), and jmp_buf */
#include "puff.h"               /* prototype for puff() */

#define local static            /* for local function definitions */
#define NIL ((unsigned char *)0)        /* for no output option */

/*
 * Maximums for allocations and loops.  It is not useful to change these --
 * they are fixed by the deflate format.
 */
#define MAXBITS 15              /* maximum bits in a code */
#define MAXLCODES 286           /* maximum number of literal/length codes */
#define MAXDCODES 30            /* maximum number of distance codes */
#define MAXCODES (MAXLCODES+MAXDCODES)  /* maximum codes lengths to read */
#define FIXLCODES 288           /* number of fixed literal/length codes */

/* input and output state */
struct state {
    /* output state */
    unsigned char *out;         /* output buffer */
    unsigned long outlen;       /* available space at out */
    unsigned long outcnt;       /* bytes written to out so far */

    /* input state */
    unsigned char *in;          /* input buffer */
    unsigned long inlen;        /* available input at in */
    unsigned long incnt;        /* bytes read so far */
    int bitbuf;                 /* bit buffer */
    int bitcnt;                 /* number of bits in bit buffer */

    /* input limit error return state for bits() and decode() */
    jmp_buf env;
};

/*
 * Return need bits from the input stream.  This always leaves less than
 * eight bits in the buffer.  bits() works properly for need == 0.
 *
 * Format notes:
 *
 * - Bits are stored in bytes from the least significant bit to the most
 *   significant bit.  Therefore bits are dropped from the bottom of the bit
 *   buffer, using shift right, and new bytes are appended to the top of the
 *   bit buffer, using shift left.
 */
local int bits(struct state *s, int need)
{
    long val;           /* bit accumulator (can use up to 20 bits) */

    /* load at least need bits into val */
    val = s->bitbuf;
    while (s->bitcnt < need) {
        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
        val |= (long)(s->in[s->incnt++]) << s->bitcnt;  /* load eight bits */
        s->bitcnt += 8;
    }

    /* drop need bits and update buffer, always zero to seven bits left */
    s->bitbuf = (int)(val >> need);
    s->bitcnt -= need;

    /* return need bits, zeroing the bits above that */
    return (int)(val & ((1L << need) - 1));
}

/*
 * Process a stored block.
 *
 * Format notes:
 *
 * - After the two-bit stored block type (00), the stored block length and
 *   stored bytes are byte-aligned for fast copying.  Therefore any leftover
 *   bits in the byte that has the last bit of the type, as many as seven, are
 *   discarded.  The value of the discarded bits are not defined and should not
 *   be checked against any expectation.
 *
 * - The second inverted copy of the stored block length does not have to be
 *   checked, but it's probably a good idea to do so anyway.
 *
 * - A stored block can have zero length.  This is sometimes used to byte-align
 *   subsets of the compressed data for random access or partial recovery.
 */
local int stored(struct state *s)
{
    unsigned len;       /* length of stored block */

    /* discard leftover bits from current byte (assumes s->bitcnt < 8) */
    s->bitbuf = 0;
    s->bitcnt = 0;

    /* get length and check against its one's complement */
    if (s->incnt + 4 > s->inlen) return 2;      /* not enough input */
    len = s->in[s->incnt++];
    len |= s->in[s->incnt++] << 8;
    if (s->in[s->incnt++] != (~len & 0xff) ||
        s->in[s->incnt++] != ((~len >> 8) & 0xff))
        return -2;                              /* didn't match complement! */

    /* copy len bytes from in to out */
    if (s->incnt + len > s->inlen) return 2;    /* not enough input */
    if (s->out != NIL) {
        if (s->outcnt + len > s->outlen)
            return 1;                           /* not enough output space */
        while (len--)
            s->out[s->outcnt++] = s->in[s->incnt++];
    }
    else {                                      /* just scanning */
        s->outcnt += len;
        s->incnt += len;
    }

    /* done with a valid stored block */
    return 0;
}

/*
 * Huffman code decoding tables.  count[1..MAXBITS] is the number of symbols of
 * each length, which for a canonical code are stepped through in order.
 * symbol[] are the symbol values in canonical order, where the number of
 * entries is the sum of the counts in count[].  The decoding process can be
 * seen in the function decode() below.
 */
struct huffman {
    short *count;       /* number of symbols of each length */
    short *symbol;      /* canonically ordered symbols */
};

/*
 * Decode a code from the stream s using huffman table h.  Return the symbol or
 * a negative value if there is an error.  If all of the lengths are zero, i.e.
 * an empty code, or if the code is incomplete and an invalid code is received,
 * then -9 is returned after reading MAXBITS bits.
 *
 * Format notes:
 *
 * - The codes as stored in the compressed data are bit-reversed relative to
 *   a simple integer ordering of codes of the same lengths.  Hence below the
 *   bits are pulled from the compressed data one at a time and used to
 *   build the code value reversed from what is in the stream in order to
 *   permit simple integer comparisons for decoding.  A table-based decoding
 *   scheme (as used in zlib) does not need to do this reversal.
 *
 * - The first code for the shortest length is all zeros.  Subsequent codes of
 *   the same length are simply integer increments of the previous code.  When
 *   moving up a length, a zero bit is appended to the code.  For a complete
 *   code, the last code of the longest length will be all ones.
 *
 * - Incomplete codes are handled by this decoder, since they are permitted
 *   in the deflate format.  See the format notes for fixed() and dynamic().
 */
#ifdef SLOW
local int decode(struct state *s, struct huffman *h)
{
    int len;            /* current number of bits in code */
    int code;           /* len bits being decoded */
    int first;          /* first code of length len */
    int count;          /* number of codes of length len */
    int index;          /* index of first code of length len in symbol table */

    code = first = index = 0;
    for (len = 1; len <= MAXBITS; len++) {
        code |= bits(s, 1);             /* get next bit */
        count = h->count[len];
        if (code < first + count)       /* if length len, return symbol */
            return h->symbol[index + (code - first)];
        index += count;                 /* else update for next length */
        first += count;
        first <<= 1;
        code <<= 1;
    }
    return -9;                          /* ran out of codes */
}

/*
 * A faster version of decode() for real applications of this code.   It's not
 * as readable, but it makes puff() twice as fast.  And it only makes the code
 * a few percent larger.
 */
#else /* !SLOW */
local int decode(struct state *s, struct huffman *h)
{
    int len;            /* current number of bits in code */
    int code;           /* len bits being decoded */
    int first;          /* first code of length len */
    int count;          /* number of codes of length len */
    int index;          /* index of first code of length len in symbol table */
    int bitbuf;         /* bits from stream */
    int left;           /* bits left in next or left to process */
    short *next;        /* next number of codes */

    bitbuf = s->bitbuf;
    left = s->bitcnt;
    code = first = index = 0;
    len = 1;
    next = h->count + 1;
    while (1) {
        while (left--) {
            code |= bitbuf & 1;
            bitbuf >>= 1;
            count = *next++;
            if (code < first + count) { /* if length len, return symbol */
                s->bitbuf = bitbuf;
                s->bitcnt = (s->bitcnt - len) & 7;
                return h->symbol[index + (code - first)];
            }
            index += count;             /* else update for next length */
            first += count;
            first <<= 1;
            code <<= 1;
            len++;
        }
        left = (MAXBITS+1) - len;
        if (left == 0) break;
        if (s->incnt == s->inlen) longjmp(s->env, 1);   /* out of input */
        bitbuf = s->in[s->incnt++];

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频91自| 久久爱www久久做| 一本一道综合狠狠老| 一色桃子久久精品亚洲| 国产美女精品人人做人人爽 | 国产美女视频91| 奇米在线7777在线精品| 美女视频黄a大片欧美| av福利精品导航| 日韩电影免费一区| 欧美在线免费播放| 欧美巨大另类极品videosbest| 91在线视频观看| 3atv一区二区三区| 国产精品国产三级国产普通话99| 国产目拍亚洲精品99久久精品| 一区二区三区日韩| 日本欧美一区二区三区乱码| 久久国产日韩欧美精品| 国产精品一二三四| 91精彩视频在线观看| 日韩精品一区二区三区四区视频| 欧美极品少妇xxxxⅹ高跟鞋| 一区二区三区91| 国产精品一二三四五| 在线免费观看日韩欧美| 久久精品欧美日韩| 日韩精品久久理论片| 94-欧美-setu| 久久精品一区二区三区四区| 国产一区二区三区黄视频| 欧美午夜精品久久久| 亚洲最色的网站| 欧美精品色一区二区三区| 国产一区二区三区免费看| 久久网站最新地址| 欧美天天综合网| 337p日本欧洲亚洲大胆色噜噜| 亚洲午夜精品在线| 日韩欧美一区二区视频| 一本大道综合伊人精品热热 | 亚洲日本丝袜连裤袜办公室| 欧美三日本三级三级在线播放| 国产精品影音先锋| 老司机精品视频在线| 亚洲你懂的在线视频| 久久综合久久综合久久综合| 欧美日韩一区在线观看| 国产裸体歌舞团一区二区| 欧美精品久久久久久久多人混战| 国产精品久久久久久久第一福利| 国产资源在线一区| 精品成人免费观看| 国产精品一区二区你懂的| 亚洲精品国产一区二区精华液 | 亚洲大片在线观看| 国产欧美在线观看一区| 欧美一级日韩一级| 欧美精品tushy高清| 91免费精品国自产拍在线不卡| 精品在线观看视频| 日日摸夜夜添夜夜添亚洲女人| 亚洲天堂av一区| 国产精品免费久久| 欧美激情一区二区三区不卡| 精品国产免费人成电影在线观看四季| 欧美午夜不卡视频| 欧美性大战久久久久久久| 91视视频在线直接观看在线看网页在线看| 国产成人在线视频免费播放| 久久精品国产成人一区二区三区| 视频一区二区中文字幕| 天堂在线一区二区| 日韩一区精品视频| 日韩高清不卡在线| 日本va欧美va精品| 黄色资源网久久资源365| 久久精品国产精品亚洲精品| 国内精品视频一区二区三区八戒| 毛片一区二区三区| 精品无人码麻豆乱码1区2区| 韩国三级在线一区| 国产精品系列在线观看| 国产成人精品免费| 国产成人精品亚洲777人妖| 成人av在线资源| 99r精品视频| 狠狠狠色丁香婷婷综合激情| 亚洲一区二区在线视频| 国产精品久久久久影院亚瑟| 日韩电影免费在线看| 欧美大肚乱孕交hd孕妇| 久久av老司机精品网站导航| 丁香五精品蜜臀久久久久99网站 | 亚洲精品在线电影| 在线观看国产日韩| 国产精品国产三级国产专播品爱网| 日韩va亚洲va欧美va久久| 蜜臀久久99精品久久久久宅男| 久久精品欧美一区二区三区不卡 | 欧美色成人综合| 91麻豆国产精品久久| 91国产福利在线| av午夜精品一区二区三区| 欧美一卡二卡在线观看| 亚洲欧美一区二区三区国产精品 | 亚洲资源在线观看| 久久精品国产免费| 国产精品不卡在线观看| 91麻豆免费观看| 欧美一区二区视频在线观看2020| 亚洲精品欧美综合四区| 色婷婷亚洲精品| 最新国产の精品合集bt伙计| 福利一区二区在线| 日韩伦理电影网| 在线一区二区观看| 亚洲三级电影全部在线观看高清| 成人免费视频国产在线观看| 亚洲特级片在线| 97精品超碰一区二区三区| 亚洲午夜免费视频| 欧美日韩一区二区不卡| 日韩精品一二三区| 欧美一区二区三区播放老司机| 亚洲精品成人少妇| 在线一区二区视频| 免费高清视频精品| 欧美一级欧美三级| 奇米综合一区二区三区精品视频| 日韩精品一区二区三区四区视频 | 在线精品视频免费播放| 五月婷婷综合网| 国产日韩精品久久久| 欧美三级视频在线观看| 国精产品一区一区三区mba桃花| 国产精品免费久久| 欧美一区三区二区| 日日噜噜夜夜狠狠视频欧美人| 91网站在线观看视频| 亚洲精品在线电影| 久久精品国产一区二区三区免费看| 日韩三级免费观看| 成人av在线资源网站| 国模无码大尺度一区二区三区| 一区二区三区在线不卡| 激情五月婷婷综合网| 欧美日韩在线播| 日本欧美一区二区三区乱码| 日韩久久久久久| 激情久久五月天| 欧美国产国产综合| 99久久久国产精品| 美国十次综合导航| 精品国产免费视频| 国产成人av福利| 国产精品国产精品国产专区不蜜| 91视频一区二区| 婷婷中文字幕一区三区| 日韩三级av在线播放| 寂寞少妇一区二区三区| 国产精品视频第一区| 在线精品视频免费观看| 蜜桃一区二区三区在线观看| 久久久久久久久久电影| 不卡电影一区二区三区| 亚洲综合色丁香婷婷六月图片| 91精品国产一区二区| 狠狠色综合播放一区二区| 中文字幕在线免费不卡| 欧美狂野另类xxxxoooo| 久久成人麻豆午夜电影| 中文字幕亚洲成人| 欧美日韩一区二区三区在线| 久久99这里只有精品| 国产精品不卡视频| 日韩情涩欧美日韩视频| 成人综合婷婷国产精品久久免费| 亚洲激情综合网| 精品国产一区二区三区不卡| 99精品视频在线观看免费| 天天av天天翘天天综合网色鬼国产| 精品国产1区二区| 欧美亚洲动漫精品| 激情成人综合网| 亚洲午夜在线视频| 国产香蕉久久精品综合网| 欧美性生活大片视频| 国产很黄免费观看久久| 亚洲高清三级视频| 国产亚洲欧洲一区高清在线观看| 精品视频免费看| 粗大黑人巨茎大战欧美成人| 日日骚欧美日韩| 亚洲色图一区二区| 337p日本欧洲亚洲大胆色噜噜| 欧美午夜电影一区| 99久久精品国产麻豆演员表| 国产一区欧美二区| 香蕉加勒比综合久久|