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

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

?? unpack.c

?? zip格式壓縮解壓縮源碼及演示 先用VC編譯czip_source目錄內(nèi)程序,之后拷貝debug目錄內(nèi)zipdll.dll和zipdll.lib到czip_demo目錄再編譯此目錄內(nèi)程序即可得到演示程
?? C
字號(hào):
/* unpack.c -- decompress files in pack format.
 * Copyright (C) 1992-1993 Jean-loup Gailly
 * This is free software; you can redistribute it and/or modify it under the
 * terms of the GNU General Public License, see the file COPYING.
 */

#ifdef RCSID
static char rcsid[] = "$Id: unpack.c,v 1.4 1993/06/11 19:25:36 jloup Exp $";
#endif

#include "tailor.h"
#include "gzip.h"
#include "crypt.h"

#define MIN(a,b) ((a) <= (b) ? (a) : (b))
/* The arguments must not have side effects. */

#define MAX_BITLEN 25
/* Maximum length of Huffman codes. (Minor modifications to the code
 * would be needed to support 32 bits codes, but pack never generates
 * more than 24 bits anyway.)
 */

#define LITERALS 256
/* Number of literals, excluding the End of Block (EOB) code */

#define MAX_PEEK 12
/* Maximum number of 'peek' bits used to optimize traversal of the
 * Huffman tree.
 */

local ulg orig_len;       /* original uncompressed length */
local int max_len;        /* maximum bit length of Huffman codes */

local uch literal[LITERALS];
/* The literal bytes present in the Huffman tree. The EOB code is not
 * represented.
 */

local int lit_base[MAX_BITLEN+1];
/* All literals of a given bit length are contiguous in literal[] and
 * have contiguous codes. literal[code+lit_base[len]] is the literal
 * for a code of len bits.
 */

local int leaves [MAX_BITLEN+1]; /* Number of leaves for each bit length */
local int parents[MAX_BITLEN+1]; /* Number of parents for each bit length */

local int peek_bits; /* Number of peek bits currently used */

/* local uch prefix_len[1 << MAX_PEEK]; */
#define prefix_len outbuf
/* For each bit pattern b of peek_bits bits, prefix_len[b] is the length
 * of the Huffman code starting with a prefix of b (upper bits), or 0
 * if all codes of prefix b have more than peek_bits bits. It is not
 * necessary to have a huge table (large MAX_PEEK) because most of the
 * codes encountered in the input stream are short codes (by construction).
 * So for most codes a single lookup will be necessary.
 */
#if (1<<MAX_PEEK) > OUTBUFSIZ
    error cannot overlay prefix_len and outbuf
#endif

local ulg bitbuf;
/* Bits are added on the low part of bitbuf and read from the high part. */

local int valid;                  /* number of valid bits in bitbuf */
/* all bits above the last valid bit are always zero */

/* Set code to the next 'bits' input bits without skipping them. code
 * must be the name of a simple variable and bits must not have side effects.
 * IN assertions: bits <= 25 (so that we still have room for an extra byte
 * when valid is only 24), and mask = (1<<bits)-1.
 */
#define look_bits(code,bits,mask) \
{ \
  while (valid < (bits)) bitbuf = (bitbuf<<8) | (ulg)get_byte(), valid += 8; \
  code = (bitbuf >> (valid-(bits))) & (mask); \
}

/* Skip the given number of bits (after having peeked at them): */
#define skip_bits(bits)  (valid -= (bits))

#define clear_bitbuf() (valid = 0, bitbuf = 0)

/* Local functions */

local void read_tree  OF((void));
local void build_tree OF((void));

/* ===========================================================================
 * Read the Huffman tree.
 */
local void read_tree()
{
    int len;  /* bit length */
    int base; /* base offset for a sequence of leaves */
    int n;

    /* Read the original input size, MSB first */
    orig_len = 0;
    for (n = 1; n <= 4; n++) orig_len = (orig_len << 8) | (ulg)get_byte();

    max_len = (int)get_byte(); /* maximum bit length of Huffman codes */
    if (max_len > MAX_BITLEN) {
	error("invalid compressed data -- Huffman code > 32 bits");
    }

    /* Get the number of leaves at each bit length */
    n = 0;
    for (len = 1; len <= max_len; len++) {
	leaves[len] = (int)get_byte();
	n += leaves[len];
    }
    if (n > LITERALS) {
	error("too many leaves in Huffman tree");
    }
    Trace((stderr, "orig_len %ld, max_len %d, leaves %d\n",
	   orig_len, max_len, n));
    /* There are at least 2 and at most 256 leaves of length max_len.
     * (Pack arbitrarily rejects empty files and files consisting of
     * a single byte even repeated.) To fit the last leaf count in a
     * byte, it is offset by 2. However, the last literal is the EOB
     * code, and is not transmitted explicitly in the tree, so we must
     * adjust here by one only.
     */
    leaves[max_len]++;

    /* Now read the leaves themselves */
    base = 0;
    for (len = 1; len <= max_len; len++) {
	/* Remember where the literals of this length start in literal[] : */
	lit_base[len] = base;
	/* And read the literals: */
	for (n = leaves[len]; n > 0; n--) {
	    literal[base++] = (uch)get_byte();
	}
    }
    leaves[max_len]++; /* Now include the EOB code in the Huffman tree */
}

/* ===========================================================================
 * Build the Huffman tree and the prefix table.
 */
local void build_tree()
{
    int nodes = 0; /* number of nodes (parents+leaves) at current bit length */
    int len;       /* current bit length */
    uch *prefixp;  /* pointer in prefix_len */

    for (len = max_len; len >= 1; len--) {
	/* The number of parent nodes at this level is half the total
	 * number of nodes at parent level:
	 */
	nodes >>= 1;
	parents[len] = nodes;
	/* Update lit_base by the appropriate bias to skip the parent nodes
	 * (which are not represented in the literal array):
	 */
	lit_base[len] -= nodes;
	/* Restore nodes to be parents+leaves: */
	nodes += leaves[len];
    }
    /* Construct the prefix table, from shortest leaves to longest ones.
     * The shortest code is all ones, so we start at the end of the table.
     */
    peek_bits = MIN(max_len, MAX_PEEK);
    prefixp = &prefix_len[1<<peek_bits];
    for (len = 1; len <= peek_bits; len++) {
	int prefixes = leaves[len] << (peek_bits-len); /* may be 0 */
	while (prefixes--) *--prefixp = (uch)len;
    }
    /* The length of all other codes is unknown: */
    while (prefixp > prefix_len) *--prefixp = 0;
}

/* ===========================================================================
 * Unpack in to out.  This routine does not support the old pack format
 * with magic header \037\037.
 *
 * IN assertions: the buffer inbuf contains already the beginning of
 *   the compressed data, from offsets inptr to insize-1 included.
 *   The magic header has already been checked. The output buffer is cleared.
 */
int unpack(in, out)
    int in, out;            /* input and output file descriptors */
{
    int len;                /* Bit length of current code */
    unsigned eob;           /* End Of Block code */
    register unsigned peek; /* lookahead bits */
    unsigned peek_mask;     /* Mask for peek_bits bits */

    ifd = in;
    ofd = out;

    read_tree();     /* Read the Huffman tree */
    build_tree();    /* Build the prefix table */
    clear_bitbuf();  /* Initialize bit input */
    peek_mask = (1<<peek_bits)-1;

    /* The eob code is the largest code among all leaves of maximal length: */
    eob = leaves[max_len]-1;
    Trace((stderr, "eob %d %x\n", max_len, eob));

    /* Decode the input data: */
    for (;;) {
	/* Since eob is the longest code and not shorter than max_len,
         * we can peek at max_len bits without having the risk of reading
         * beyond the end of file.
	 */
	look_bits(peek, peek_bits, peek_mask);
	len = prefix_len[peek];
	if (len > 0) {
	    peek >>= peek_bits - len; /* discard the extra bits */
	} else {
	    /* Code of more than peek_bits bits, we must traverse the tree */
	    ulg mask = peek_mask;
	    len = peek_bits;
	    do {
                len++, mask = (mask<<1)+1;
		look_bits(peek, len, mask);
	    } while (peek < (unsigned)parents[len]);
	    /* loop as long as peek is a parent node */
	}
	/* At this point, peek is the next complete code, of len bits */
	if (peek == eob && len == max_len) break; /* end of file? */
	put_ubyte(literal[peek+lit_base[len]]);
	Tracev((stderr,"%02d %04x %c\n", len, peek,
		literal[peek+lit_base[len]]));
	skip_bits(len);
    } /* for (;;) */

    flush_window();
    Trace((stderr, "bytes_out %ld\n", bytes_out));
    if (orig_len != (ulg)bytes_out) {
	error("invalid compressed data--length error");
    }
    return OK;
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区精品视频| 欧美一区2区视频在线观看| 本田岬高潮一区二区三区| 制服丝袜在线91| 老司机免费视频一区二区| 韩国欧美国产1区| 国产一区 二区 三区一级| 欧美日韩国产影片| 欧美在线视频日韩| 中文字幕二三区不卡| 精品视频一区二区三区免费| 国产乱码精品一品二品| 日韩二区三区在线观看| 国产精品久久久久影院| 欧美精品一区二| 7777精品伊人久久久大香线蕉完整版 | 一区二区三区蜜桃| 色综合天天综合| 亚洲一区二区三区四区在线| av电影在线不卡| 亚洲精品中文在线影院| 国产精品欧美极品| eeuss鲁片一区二区三区在线观看| 日本美女一区二区三区| 亚洲二区在线视频| 亚洲大尺度视频在线观看| 亚洲久草在线视频| 亚洲自拍偷拍欧美| 国产精品女主播av| 国产日韩欧美精品一区| 成人精品国产一区二区4080| 日欧美一区二区| 日本女优在线视频一区二区 | 欧美日韩另类一区| 日本精品免费观看高清观看| 99精品久久99久久久久| 色婷婷亚洲精品| 色噜噜夜夜夜综合网| 欧美视频精品在线| 欧美一区二区精美| 久久一夜天堂av一区二区三区| 欧美电视剧在线看免费| 国产欧美一区二区三区网站| 亚洲国产经典视频| 亚洲国产精品尤物yw在线观看| 性感美女极品91精品| 经典三级在线一区| 91视频在线观看免费| 欧美挠脚心视频网站| 久久伊人中文字幕| 亚洲美女淫视频| 久久精品国产亚洲aⅴ| 色婷婷一区二区| 成人中文字幕合集| 国产综合色精品一区二区三区| 污片在线观看一区二区| 国产精品视频yy9299一区| 亚洲在线视频网站| 国产欧美精品区一区二区三区| 国产精品色哟哟网站| 国产欧美日韩在线观看| 国产精品青草综合久久久久99| 国产午夜一区二区三区| 国产福利视频一区二区三区| 国产aⅴ精品一区二区三区色成熟| 精一区二区三区| 国产成人av一区二区三区在线 | 性久久久久久久久久久久 | 国产凹凸在线观看一区二区| 成人理论电影网| 欧美综合天天夜夜久久| 欧美一区二区精品久久911| 久久视频一区二区| 国产精品国产三级国产aⅴ中文 | 国产日韩欧美精品在线| 亚洲人成精品久久久久| 视频一区视频二区中文字幕| 激情久久五月天| av激情成人网| 91精品综合久久久久久| 国产区在线观看成人精品| 中文字幕色av一区二区三区| 午夜精品一区二区三区电影天堂 | 日本亚洲三级在线| 大陆成人av片| 欧美男男青年gay1069videost| 精品国产免费视频| 一区二区三区自拍| 韩国成人在线视频| 91豆麻精品91久久久久久| 日韩欧美色综合网站| 亚洲同性gay激情无套| 青青草97国产精品免费观看| jiyouzz国产精品久久| 日韩一级免费观看| 亚洲精品亚洲人成人网在线播放| 捆绑紧缚一区二区三区视频| 一本大道av伊人久久综合| 欧美精品一区二区三区高清aⅴ | 国产剧情一区二区| 欧美老年两性高潮| 国产精品传媒视频| 精品亚洲porn| 在线播放中文字幕一区| 亚洲欧美综合色| 国产精品一卡二| 欧美一区二区三区在线| 亚洲人吸女人奶水| 国产成a人亚洲精品| 日韩欧美在线123| 亚洲成人第一页| 92国产精品观看| 国产女人水真多18毛片18精品视频 | 久久综合久久鬼色中文字| 亚洲国产成人精品视频| www.欧美.com| 久久久综合网站| 精品一区二区三区在线视频| 欧美日韩在线播放一区| 亚洲精品中文字幕乱码三区| 成人午夜私人影院| 国产婷婷色一区二区三区四区| 久久精品国产网站| 欧美一级爆毛片| 日韩电影一二三区| 7777精品久久久大香线蕉| 亚洲综合在线观看视频| 日本高清视频一区二区| 亚洲欧洲国产日韩| 91在线视频网址| 亚洲欧美另类小说| 色悠悠久久综合| 亚洲欧美日韩精品久久久久| 99麻豆久久久国产精品免费| 中文字幕不卡三区| 粉嫩av一区二区三区| 欧美极品美女视频| 成人h动漫精品| 1024亚洲合集| 日本韩国欧美在线| 亚洲国产你懂的| 337p亚洲精品色噜噜噜| 奇米色777欧美一区二区| 日韩午夜在线观看| 精品一区二区免费看| 久久嫩草精品久久久久| 国产成人精品在线看| 国产精品理伦片| 色综合色狠狠天天综合色| 亚洲综合区在线| 7777精品伊人久久久大香线蕉最新版 | 精品久久久三级丝袜| 国产乱码精品一区二区三区忘忧草 | 中文字幕乱码亚洲精品一区| 成人性色生活片免费看爆迷你毛片| 中文天堂在线一区| 一本到不卡免费一区二区| 一区二区三区国产精品| 91精品国产综合久久小美女| 另类小说欧美激情| 久久久久高清精品| av一二三不卡影片| 亚洲成人av一区二区三区| 日韩免费一区二区| 成人激情视频网站| 一区二区三区美女| 日韩欧美成人激情| 成人蜜臀av电影| 亚洲国产日韩a在线播放性色| 欧美一区二区久久| 不卡高清视频专区| 日一区二区三区| 国产欧美日韩麻豆91| 欧美视频一区在线观看| 精品制服美女久久| 亚洲精品中文在线观看| 日韩欧美三级在线| 91污在线观看| 久久精品国产免费看久久精品| 国产精品久久三区| 欧美一级在线免费| 99精品久久久久久| 精品中文av资源站在线观看| 亚洲男同1069视频| 精品久久久久久综合日本欧美| 97久久久精品综合88久久| 免费国产亚洲视频| 亚洲人成网站在线| 久久久三级国产网站| 精品视频全国免费看| 国产精品一区二区91| 天堂蜜桃91精品| 国产精品久久久久久一区二区三区| 91精品国产麻豆| 色婷婷综合久久久中文一区二区 | 欧美日韩国产小视频| 不卡电影免费在线播放一区| 美女国产一区二区| 亚洲成人动漫av| 亚洲乱码国产乱码精品精小说 |