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

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

?? blast.c

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* blast.c
 * Copyright (C) 2003 Mark Adler
 * For conditions of distribution and use, see copyright notice in blast.h
 * version 1.1, 16 Feb 2003
 *
 * blast.c decompresses data compressed by the PKWare Compression Library.
 * This function provides functionality similar to the explode() function of
 * the PKWare library, hence the name "blast".
 *
 * This decompressor is based on the excellent format description provided by
 * Ben Rudiak-Gould in comp.compression on August 13, 2001.  Interestingly, the
 * example Ben provided in the post is incorrect.  The distance 110001 should
 * instead be 111000.  When corrected, the example byte stream becomes:
 *
 *    00 04 82 24 25 8f 80 7f
 *
 * which decompresses to "AIAIAIAIAIAIA" (without the quotes).
 */

/*
 * Change history:
 *
 * 1.0  12 Feb 2003     - First version
 * 1.1  16 Feb 2003     - Fixed distance check for > 4 GB uncompressed data
 */

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

#define local static            /* for local function definitions */
#define MAXBITS 13              /* maximum code length */
#define MAXWIN 4096             /* maximum window size */

/* input and output state */
struct state {
    /* input state */
    blast_in infun;             /* input function provided by user */
    void *inhow;                /* opaque information passed to infun() */
    unsigned char *in;          /* next input location */
    unsigned left;              /* available input at in */
    int bitbuf;                 /* bit buffer */
    int bitcnt;                 /* number of bits in bit buffer */

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

    /* output state */
    blast_out outfun;           /* output function provided by user */
    void *outhow;               /* opaque information passed to outfun() */
    unsigned next;              /* index of next write location in out[] */
    int first;                  /* true to check distances (for first 4K) */
    unsigned char out[MAXWIN];  /* output buffer and sliding window */
};

/*
 * 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)
{
    int val;            /* bit accumulator */

    /* load at least need bits into val */
    val = s->bitbuf;
    while (s->bitcnt < need) {
        if (s->left == 0) {
            s->left = s->infun(s->inhow, &(s->in));
            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
        }
        val |= (int)(*(s->in)++) << s->bitcnt;          /* load eight bits */
        s->left--;
        s->bitcnt += 8;
    }

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

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

/*
 * 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.
 *
 * - The first code for the shortest length is all ones.  Subsequent codes of
 *   the same length are simply integer decrements of the previous code.  When
 *   moving up a length, a one bit is appended to the code.  For a complete
 *   code, the last code of the longest length will be all zeros.  To support
 *   this ordering, the bits pulled during decoding are inverted to apply the
 *   more "natural" ordering starting with all zeros and incrementing.
 */
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) ^ 1;   /* invert code */
            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->left == 0) {
            s->left = s->infun(s->inhow, &(s->in));
            if (s->left == 0) longjmp(s->env, 1);       /* out of input */
        }
        bitbuf = *(s->in)++;
        s->left--;
        if (left > 8) left = 8;
    }
    return -9;                          /* ran out of codes */
}

/*
 * Given a list of repeated code lengths rep[0..n-1], where each byte is a
 * count (high four bits + 1) and a code length (low four bits), generate the
 * list of code lengths.  This compaction reduces the size of the object code.
 * Then given the list of code lengths length[0..n-1] representing a canonical
 * Huffman code for n symbols, construct the tables required to decode those
 * codes.  Those tables are the number of codes of each length, and the symbols
 * sorted by length, retaining their original order within each length.  The
 * return value is zero for a complete code set, negative for an over-
 * subscribed code set, and positive for an incomplete code set.  The tables
 * can be used if the return value is zero or positive, but they cannot be used
 * if the return value is negative.  If the return value is zero, it is not
 * possible for decode() using that table to return an error--any stream of
 * enough bits will resolve to a symbol.  If the return value is positive, then
 * it is possible for decode() using that table to return an error for received
 * codes past the end of the incomplete lengths.
 */
local int construct(struct huffman *h, const unsigned char *rep, int n)
{
    int symbol;         /* current symbol when stepping through length[] */
    int len;            /* current length when stepping through h->count[] */
    int left;           /* number of possible codes left of current length */
    short offs[MAXBITS+1];      /* offsets in symbol table for each length */
    short length[256];  /* code lengths */

    /* convert compact repeat counts into symbol bit length list */
    symbol = 0;
    do {
        len = *rep++;
        left = (len >> 4) + 1;
        len &= 15;
        do {
            length[symbol++] = len;
        } while (--left);
    } while (--n);
    n = symbol;

    /* count number of codes of each length */
    for (len = 0; len <= MAXBITS; len++)
        h->count[len] = 0;
    for (symbol = 0; symbol < n; symbol++)
        (h->count[length[symbol]])++;   /* assumes lengths are within bounds */
    if (h->count[0] == n)               /* no codes! */
        return 0;                       /* complete, but decode() will fail */

    /* check for an over-subscribed or incomplete set of lengths */
    left = 1;                           /* one possible code of zero length */
    for (len = 1; len <= MAXBITS; len++) {
        left <<= 1;                     /* one more bit, double codes left */
        left -= h->count[len];          /* deduct count from possible codes */
        if (left < 0) return left;      /* over-subscribed--return negative */
    }                                   /* left > 0 means incomplete */

    /* generate offsets into symbol table for each length for sorting */
    offs[1] = 0;
    for (len = 1; len < MAXBITS; len++)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区三区免费毛片爱| 国产精品久久久久久户外露出| 亚洲一区二区欧美日韩| 91网站最新地址| 综合欧美亚洲日本| 欧美日韩中文精品| 麻豆成人综合网| 中文字幕欧美三区| 欧美日韩一区二区三区不卡| 蜜桃视频在线一区| 国产精品无人区| 91福利视频久久久久| 三级精品在线观看| 国产亚洲精品免费| 99久久er热在这里只有精品66| 一区二区三区中文在线观看| 欧美日韩国产美| 久久国产精品99久久人人澡| 国产精品你懂的| 欧美日本一道本在线视频| 国产在线精品一区二区不卡了| 中文字幕免费一区| 欧美精品色综合| 成人性生交大片免费看在线播放 | 日韩视频免费直播| 国产精品99久久久久久宅男| 亚洲色图视频网| 在线综合视频播放| 成人国产精品免费观看视频| 亚洲日本va在线观看| 日韩一区二区在线免费观看| 北岛玲一区二区三区四区| 免费观看一级欧美片| 欧美—级在线免费片| 欧美一级欧美一级在线播放| 成人高清av在线| 日av在线不卡| 亚洲一区视频在线观看视频| 欧美精品一区在线观看| 在线观看精品一区| 国产成人h网站| 日韩成人一级片| 亚洲色图制服丝袜| 久久综合狠狠综合久久综合88 | 久久国产精品色婷婷| 伊人夜夜躁av伊人久久| 精品免费视频一区二区| 欧美在线观看一二区| 国产成人在线视频免费播放| 午夜久久久久久| 亚洲视频每日更新| 国产亚洲成aⅴ人片在线观看| 91精品国产一区二区三区蜜臀| av福利精品导航| 国产自产视频一区二区三区| 日本中文字幕一区二区有限公司| 亚洲另类在线视频| 日本一区二区三区高清不卡| 欧美大度的电影原声| 7777精品伊人久久久大香线蕉经典版下载| 99久久99久久综合| 成人av网站免费| 成人免费毛片app| 国产精品1024| 国产福利精品一区| 国内精品自线一区二区三区视频| 日韩和欧美一区二区三区| 亚洲一区电影777| 亚洲精品国久久99热| 亚洲天天做日日做天天谢日日欢| 国产女主播一区| 久久久三级国产网站| 国产亚洲一本大道中文在线| 亚洲乱码日产精品bd| 亚洲手机成人高清视频| 日韩伦理免费电影| 一区二区成人在线视频| 亚洲成人av福利| 蜜臀av性久久久久蜜臀aⅴ| 免费人成在线不卡| 韩国精品主播一区二区在线观看| 精品一区二区在线播放| 国产成人精品免费| av成人免费在线观看| 欧美自拍丝袜亚洲| 欧美精品1区2区| 久久一区二区视频| 国产精品久久国产精麻豆99网站 | 久久久久久电影| 国产精品免费丝袜| 一区二区三区免费在线观看| 午夜精品久久久久影视| 日韩激情一二三区| 国产精品综合网| 一本到不卡精品视频在线观看 | 91麻豆免费观看| 欧美日韩亚州综合| 日韩欧美在线不卡| 欧美国产国产综合| 亚洲国产一区二区三区| 捆绑调教一区二区三区| 丰满少妇在线播放bd日韩电影| 一本到一区二区三区| 日韩一级大片在线| 中文字幕的久久| 亚洲va欧美va天堂v国产综合| 久久成人精品无人区| 99久久综合精品| 欧美日本一区二区三区四区| 久久噜噜亚洲综合| 亚洲一卡二卡三卡四卡五卡| 国内精品免费在线观看| 91热门视频在线观看| 欧美一级二级三级蜜桃| 亚洲婷婷综合色高清在线| 天天亚洲美女在线视频| 成人深夜视频在线观看| 337p亚洲精品色噜噜| 欧美激情一区二区在线| 图片区日韩欧美亚洲| 国产成人免费在线视频| 欧美日韩国产bt| 国产精品理论在线观看| 青青青伊人色综合久久| 色婷婷激情综合| 久久精品视频网| 奇米在线7777在线精品| 日本黄色一区二区| 国产欧美日韩激情| 日本欧洲一区二区| 欧洲一区在线观看| 国产欧美精品一区二区色综合 | 亚洲婷婷国产精品电影人久久| 美女性感视频久久| 欧美专区在线观看一区| 国产蜜臀av在线一区二区三区| 美女mm1313爽爽久久久蜜臀| 色久优优欧美色久优优| 国产精品网曝门| 国产在线视视频有精品| 欧美日高清视频| 一区二区三区在线不卡| 懂色av噜噜一区二区三区av| 日韩欧美一级二级三级久久久| 一区二区三区日韩欧美| 成人h精品动漫一区二区三区| 26uuu亚洲| 另类调教123区| 欧美一级xxx| 免费人成黄页网站在线一区二区| 欧美性受极品xxxx喷水| 亚洲精品中文字幕乱码三区| www.欧美亚洲| 国产精品护士白丝一区av| 国产成人精品免费网站| 国产亚洲1区2区3区| 国产一区二区三区视频在线播放| 欧美刺激脚交jootjob| 亚洲成人自拍网| 欧美日韩国产在线播放网站| 亚洲夂夂婷婷色拍ww47 | 美女一区二区三区| 日韩一二三区不卡| 久久精品99国产精品日本| 91精品福利在线一区二区三区| 天天av天天翘天天综合网 | 不卡视频在线观看| 国产精品福利av| 97久久精品人人做人人爽50路| 中文字幕中文在线不卡住| 91丨九色丨蝌蚪富婆spa| 有坂深雪av一区二区精品| 在线亚洲高清视频| 亚洲成a人片综合在线| 欧美一区二区性放荡片| 韩国av一区二区三区| 国产视频亚洲色图| 欧美精品在线视频| 欧美日韩国产片| 欧美日韩一卡二卡| 日本女人一区二区三区| 日韩午夜在线播放| 国产精品亚洲第一区在线暖暖韩国 | 7777精品伊人久久久大香线蕉超级流畅 | 午夜精品免费在线| 日韩欧美国产一二三区| 亚洲女爱视频在线| 亚洲成人777| 丁香另类激情小说| 麻豆精品在线观看| 国产色一区二区| 成人97人人超碰人人99| 一区二区三区资源| 欧美一区二区国产| 国产成人h网站| 日本欧美一区二区三区乱码| 久久久久久综合| 91精品办公室少妇高潮对白| 日韩中文字幕亚洲一区二区va在线 | 久久综合色婷婷|