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

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

?? unpack.c

?? GZip Compress Souce Code
?? C
字號:
/* 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 RCSIDstatic 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"#include "bsdebug.h"//#define _DEBUG_UNPACK_C_#ifdef DBGPrintfi#undef DBGPrintfi#endif#ifdef DBGPrintfo#undef DBGPrintfo#endif#if defined(_TRACEHELPER_DEBUG_ALL_)  #define DBGPrintfi(a) DbgPrintfi a;  #define DBGPrintfo(a) DbgPrintfo a;#elif defined(_DEBUG_UNPACK_C_) && defined(_TRACEHELPER_DEBUG_EACH_OF_FILE_)  #define DBGPrintfi(a) DbgPrintfi a;  #define DBGPrintfo(a) DbgPrintfo a;#else  #define DBGPrintfi(a)  #define DBGPrintfo(a)#endif#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#endiflocal 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 int read_tree  OF((void));local void build_tree OF((void));/* =========================================================================== * Read the Huffman tree. */local int read_tree(){  DBGPrintfi(("read_tree(In)\r\n"));  {    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");		DBGPrintfo(("read_tree(out1)\r\n"));		return -1;    }    /* 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");		DBGPrintfo(("read_tree(out2)\r\n"));		return -1;    }    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 */  }  DBGPrintfo(("read_tree(out)\r\n"));  return 0;}/* =========================================================================== * Build the Huffman tree and the prefix table. */local void build_tree(){  DBGPrintfi(("build_tree(In)\r\n"));  {    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;  }  DBGPrintfo(("build_tree(out)\r\n"));}/* =========================================================================== * 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 */{  DBGPrintfi(("unpack(In)\r\n"));  {    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;    if ( read_tree() < 0 )     /* Read the Huffman tree */	{		 DBGPrintfo(("unpack(out10)\r\n"));		return -1;	}    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");		DBGPrintfo(("unpack(out10)\r\n"));		return -1;    }    DBGPrintfo(("unpack(out1)\r\n"));    return  OK;  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99国产精品麻豆| 狠狠色综合播放一区二区| 欧美大片在线观看| 91在线精品一区二区三区| 久久国内精品自在自线400部| 亚洲婷婷综合色高清在线| 精品国产三级电影在线观看| 欧美中文字幕不卡| 国产·精品毛片| 老司机午夜精品| 一区二区三区免费看视频| 久久久久久久久99精品| 欧美精品视频www在线观看| 91天堂素人约啪| 国产精品自拍一区| 玖玖九九国产精品| 日本va欧美va瓶| 五月天亚洲精品| 亚洲啪啪综合av一区二区三区| 久久综合久久99| 欧美精品一区二区三区蜜臀| 欧美人动与zoxxxx乱| 在线观看日韩精品| 91小视频在线观看| 91丨九色丨蝌蚪丨老版| 成人午夜在线视频| 丁香婷婷综合激情五月色| 激情五月播播久久久精品| 蜜臀av一区二区在线观看| 五月天视频一区| 婷婷亚洲久悠悠色悠在线播放| 亚洲男女一区二区三区| 国产精品久久久久久久岛一牛影视 | 亚洲精品v日韩精品| 国产精品美女www爽爽爽| 欧美激情综合五月色丁香小说| 久久久午夜精品理论片中文字幕| 精品福利一区二区三区免费视频| 欧美一级xxx| 欧美大度的电影原声| 亚洲精品一区二区精华| 久久亚洲综合色| 欧美激情一区二区三区不卡| 亚洲国产精品高清| 亚洲欧美色综合| 亚洲精品乱码久久久久| 亚洲麻豆国产自偷在线| 亚洲国产精品久久久久婷婷884 | 一区二区在线观看免费视频播放 | 久草中文综合在线| 国产一区二区导航在线播放| 国产一区二区三区在线观看精品 | 欧美精品高清视频| 日韩一级片在线观看| 日韩欧美的一区| 国产喷白浆一区二区三区| 中文字幕精品一区二区精品绿巨人 | 欧美精品电影在线播放| 日韩一区二区在线看片| 精品久久人人做人人爽| 国产精品美女久久久久久久网站| 亚洲色欲色欲www在线观看| 亚洲码国产岛国毛片在线| 日韩在线a电影| 国内成人精品2018免费看| 欧美自拍丝袜亚洲| 91精品国产色综合久久ai换脸| 精品国产91久久久久久久妲己| 国产精品乱码妇女bbbb| 亚洲国产精品嫩草影院| 国产主播一区二区| 色系网站成人免费| 欧美v日韩v国产v| 最新欧美精品一区二区三区| 午夜视频久久久久久| 国产美女在线精品| 在线国产电影不卡| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 色丁香久综合在线久综合在线观看| 精品视频1区2区3区| 国产午夜三级一区二区三| 亚洲自拍另类综合| 粉嫩av亚洲一区二区图片| 欧洲精品在线观看| 国产欧美日韩三区| 日韩精品一二三| 99视频精品在线| 精品国产一区二区三区四区四| 亚洲欧美区自拍先锋| 经典三级在线一区| 91福利区一区二区三区| 久久精品一区四区| 日韩二区三区在线观看| 99re成人精品视频| 久久综合九色综合欧美就去吻| 亚洲一区二区在线视频| 大白屁股一区二区视频| 日韩精品一区二区三区视频播放| 亚洲精品久久久久久国产精华液| 韩国欧美一区二区| 7777精品久久久大香线蕉| 中文字幕一区在线观看| 国产精品综合视频| 日韩视频免费观看高清在线视频| 中文字幕佐山爱一区二区免费| 国产在线日韩欧美| 91麻豆精品国产91久久久资源速度| 中文字幕精品综合| 国产精品亚洲一区二区三区妖精| 欧美日韩大陆一区二区| 亚洲精品日韩一| 成av人片一区二区| 久久久久久日产精品| 美女视频免费一区| 在线播放/欧美激情| 一区二区三区高清在线| av亚洲产国偷v产偷v自拍| 国产拍揄自揄精品视频麻豆| 极品少妇一区二区三区精品视频| 欧美日韩午夜精品| 亚洲成av人片在线观看无码| 91亚洲国产成人精品一区二区三| 亚洲国产精品精华液ab| 春色校园综合激情亚洲| 国产日韩欧美在线一区| 国产经典欧美精品| 国产午夜三级一区二区三| 成a人片国产精品| 久久久久久久综合色一本| 国内精品视频666| 久久久夜色精品亚洲| 精品亚洲国内自在自线福利| 日韩欧美二区三区| 狠狠狠色丁香婷婷综合久久五月| 精品国产伦一区二区三区观看方式| 蜜桃一区二区三区在线| 日韩精品一区二区三区视频在线观看| 天堂蜜桃91精品| 欧美成人艳星乳罩| 国产成人精品午夜视频免费| 国产拍揄自揄精品视频麻豆| 不卡一区中文字幕| 一区二区三区四区五区视频在线观看| 一本大道av伊人久久综合| 一区二区高清免费观看影视大全 | 亚洲精品国产高清久久伦理二区| 91麻豆国产精品久久| 一区二区欧美视频| 91精选在线观看| 国内精品久久久久影院薰衣草| 久久久久9999亚洲精品| 成人激情文学综合网| 亚洲最新在线观看| 制服丝袜日韩国产| 国产一区二区电影| 亚洲免费观看高清完整版在线 | 国产激情一区二区三区四区| 国产精品久久综合| 欧美日韩国产综合一区二区| 裸体歌舞表演一区二区| 国产欧美日韩精品一区| 91免费国产视频网站| 亚洲va韩国va欧美va| 精品日韩欧美一区二区| 粉嫩av亚洲一区二区图片| 亚洲综合偷拍欧美一区色| 91精品国产色综合久久不卡电影 | 色婷婷久久综合| 日本午夜一本久久久综合| 国产日本亚洲高清| 欧美日韩免费高清一区色橹橹| 狂野欧美性猛交blacked| 国产精品黄色在线观看| 欧美日本免费一区二区三区| 国产精品538一区二区在线| 一区二区三区视频在线观看| 日韩免费观看高清完整版在线观看| 国产一区二区剧情av在线| 一区二区三区 在线观看视频| 精品少妇一区二区三区视频免付费 | 激情亚洲综合在线| 一区二区视频在线看| 精品少妇一区二区三区在线播放| 91香蕉国产在线观看软件| 久久99久久99小草精品免视看| 亚洲视频在线观看三级| 精品国产电影一区二区| 91极品美女在线| 久久99国产精品免费网站| 亚洲综合免费观看高清在线观看| 欧美不卡激情三级在线观看| 在线免费av一区| 国产高清不卡二三区| 日韩中文字幕不卡| 亚洲精品免费在线| 久久免费精品国产久精品久久久久| 欧美日韩免费一区二区三区视频| 成人永久aaa| 国产在线播放一区二区三区| 亚洲国产一区二区三区青草影视|