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

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

?? inftrees.cpp

?? 一個C語言實現的壓縮解壓的工具代碼
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/* inftrees.c -- generate Huffman trees for efficient decoding
 * Copyright (C) 1995-1998 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h 
 */
#include "stdafx.h"

#include "zutil.h"
#include "inftrees.h"

#if !defined(BUILDFIXED) && !defined(STDC)
#  define BUILDFIXED   /* non ANSI compilers may not accept inffixed.h */
#endif

const char inflate_copyright[] =
   " inflate 1.1.3 Copyright 1995-1998 Mark Adler ";
/*
  If you use the zlib library in a product, an acknowledgment is welcome
  in the documentation of your product. If for some reason you cannot
  include such an acknowledgment, I would appreciate that you keep this
  copyright string in the executable of your product.
 */
struct internal_state  {int dummy;}; /* for buggy compilers */

/* simplify the use of the inflate_huft type with some defines */
#define exop word.what.Exop
#define bits word.what.Bits


local int huft_build OF((
    uIntf *,            /* code lengths in bits */
    uInt,               /* number of codes */
    uInt,               /* number of "simple" codes */
    const uIntf *,      /* list of base values for non-simple codes */
    const uIntf *,      /* list of extra bits for non-simple codes */
    inflate_huft * FAR*,/* result: starting table */
    uIntf *,            /* maximum lookup bits (returns actual) */
    inflate_huft *,     /* space for trees */
    uInt *,             /* hufts used in space */
    uIntf * ));         /* space for values */

/* Tables for deflate from PKZIP's appnote.txt. */
local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */
        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
        /* see note #13 above about 258 */
local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */
local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */
        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
        8193, 12289, 16385, 24577};
local const uInt cpdext[30] = { /* Extra bits for distance codes */
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
        12, 12, 13, 13};

/*
   Huffman code decoding is performed using a multi-level table lookup.
   The fastest way to decode is to simply build a lookup table whose
   size is determined by the longest code.  However, the time it takes
   to build this table can also be a factor if the data being decoded
   is not very long.  The most common codes are necessarily the
   shortest codes, so those codes dominate the decoding time, and hence
   the speed.  The idea is you can have a shorter table that decodes the
   shorter, more probable codes, and then point to subsidiary tables for
   the longer codes.  The time it costs to decode the longer codes is
   then traded against the time it takes to make longer tables.

   This results of this trade are in the variables lbits and dbits
   below.  lbits is the number of bits the first level table for literal/
   length codes can decode in one step, and dbits is the same thing for
   the distance codes.  Subsequent tables are also less than or equal to
   those sizes.  These values may be adjusted either when all of the
   codes are shorter than that, in which case the longest code length in
   bits is used, or when the shortest code is *longer* than the requested
   table size, in which case the length of the shortest code in bits is
   used.

   There are two different values for the two tables, since they code a
   different number of possibilities each.  The literal/length table
   codes 286 possible values, or in a flat code, a little over eight
   bits.  The distance table codes 30 possible values, or a little less
   than five bits, flat.  The optimum values for speed end up being
   about one bit more than those, so lbits is 8+1 and dbits is 5+1.
   The optimum values may differ though from machine to machine, and
   possibly even between compilers.  Your mileage may vary.
 */


/* If BMAX needs to be larger than 16, then h and x[] should be uLong. */
#define BMAX 15         /* maximum bit length of any code */

local int huft_build(uIntf *b,             /* code lengths in bits (all assumed <= BMAX) */
uInt n,                /* number of codes (assumed <= 288) */
uInt s,               /* number of simple-valued codes (0..s-1) */
const uIntf *d,         /* list of base values for non-simple codes */
const uIntf *e,         /* list of extra bits for non-simple codes */
inflate_huft * FAR *t,  /* result: starting table */
uIntf *m,            /* maximum lookup bits, returns actual */
inflate_huft *hp,      /* space for trees */
uInt *hn,              /* hufts used in space */
uIntf *v              /* working area: values in order of bit length */
/* Given a list of code lengths and a maximum table size, make a set of
   tables to decode that set of codes.  Return Z_OK on success, Z_BUF_ERROR
   if the given code set is incomplete (the tables are still built in this
   case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of
   lengths), or Z_MEM_ERROR if not enough memory. */)

{

  uInt a;                       /* counter for codes of length k */
  uInt c[BMAX+1];               /* bit length count table */
  uInt f;                       /* i repeats in table every f entries */
  int g;                        /* maximum code length */
  int h;                        /* table level */
  register uInt i;              /* counter, current code */
  register uInt j;              /* counter */
  register int k;               /* number of bits in current code */
  int l;                        /* bits per table (returned in m) */
  uInt mask;                    /* (1 << w) - 1, to avoid cc -O bug on HP */
  register uIntf *p;            /* pointer into c[], b[], or v[] */
  inflate_huft *q;              /* points to current table */
  struct inflate_huft_s r;      /* table entry for structure assignment */
  inflate_huft *u[BMAX];        /* table stack */
  register int w;               /* bits before this table == (l * h) */
  uInt x[BMAX+1];               /* bit offsets, then code stack */
  uIntf *xp;                    /* pointer into x */
  int y;                        /* number of dummy codes added */
  uInt z;                       /* number of entries in current table */


  /* Generate counts for each bit length */
  p = c;
#define C0 *p++ = 0;
#define C2 C0 C0 C0 C0
#define C4 C2 C2 C2 C2
  C4                            /* clear c[]--assume BMAX+1 is 16 */
  p = b;  i = n;
  do {
    c[*p++]++;                  /* assume all entries <= BMAX */
  } while (--i);
  if (c[0] == n)                /* null input--all zero length codes */
  {
    *t = (inflate_huft *)Z_NULL;
    *m = 0;
    return Z_OK;
  }


  /* Find minimum and maximum length, bound *m by those */
  l = *m;
  for (j = 1; j <= BMAX; j++)
    if (c[j])
      break;
  k = j;                        /* minimum code length */
  if ((uInt)l < j)
    l = j;
  for (i = BMAX; i; i--)
    if (c[i])
      break;
  g = i;                        /* maximum code length */
  if ((uInt)l > i)
    l = i;
  *m = l;


  /* Adjust last length count to fill out codes, if needed */
  for (y = 1 << j; j < i; j++, y <<= 1)
    if ((y -= c[j]) < 0)
      return Z_DATA_ERROR;
  if ((y -= c[i]) < 0)
    return Z_DATA_ERROR;
  c[i] += y;


  /* Generate starting offsets into the value table for each length */
  x[1] = j = 0;
  p = c + 1;  xp = x + 2;
  while (--i) {                 /* note that i == g from above */
    *xp++ = (j += *p++);
  }


  /* Make a table of values in order of bit lengths */
  p = b;  i = 0;
  do {
    if ((j = *p++) != 0)
      v[x[j]++] = i;
  } while (++i < n);
  n = x[g];                     /* set n to length of v */


  /* Generate the Huffman codes and for each, make the table entries */
  x[0] = i = 0;                 /* first Huffman code is zero */
  p = v;                        /* grab values in bit order */
  h = -1;                       /* no tables yet--level -1 */
  w = -l;                       /* bits decoded == (l * h) */
  u[0] = (inflate_huft *)Z_NULL;        /* just to keep compilers happy */
  q = (inflate_huft *)Z_NULL;   /* ditto */
  z = 0;                        /* ditto */

  /* go through the bit lengths (k already is bits in shortest code) */
  for (; k <= g; k++)
  {
    a = c[k];
    while (a--)
    {
      /* here i is the Huffman code of length k bits for value *p */
      /* make tables up to required level */
      while (k > w + l)
      {
        h++;
        w += l;                 /* previous table always l bits */

        /* compute minimum size table less than or equal to l bits */
        z = g - w;
        z = z > (uInt)l ? l : z;        /* table size upper limit */
        if ((f = 1 << (j = k - w)) > a + 1)     /* try a k-w bit table */
        {                       /* too few codes for k-w bit table */
          f -= a + 1;           /* deduct codes from patterns left */
          xp = c + k;
          if (j < z)
            while (++j < z)     /* try smaller tables up to z bits */
            {
              if ((f <<= 1) <= *++xp)
                break;          /* enough codes to use up j bits */
              f -= *xp;         /* else deduct codes from patterns */
            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品videosex极品| 亚洲黄色小视频| 91精品国产综合久久久蜜臀图片 | 日韩欧美一区二区视频| 日本韩国精品在线| 91精品办公室少妇高潮对白| www.亚洲激情.com| 9久草视频在线视频精品| 成人做爰69片免费看网站| 国产91在线观看| 粉嫩一区二区三区在线看| 粉嫩高潮美女一区二区三区| 国产精品亚洲第一区在线暖暖韩国| 国内久久精品视频| 国产成人av电影在线观看| 国产精品18久久久久久久久| 夫妻av一区二区| av电影天堂一区二区在线观看| 色一区在线观看| 91麻豆精品国产91久久久 | 99精品在线观看视频| 成人av网站在线| 91国内精品野花午夜精品 | 国产一区二区三区四区五区入口 | 国产精品乱码一区二区三区软件| 国产日韩欧美综合在线| 国产精品高潮呻吟| 亚洲综合一区二区| 麻豆国产一区二区| 99re66热这里只有精品3直播| 色婷婷av久久久久久久| 91精品国产综合久久小美女| 久久美女高清视频| 一区二区三区在线视频观看58| 青青草国产成人99久久| 风间由美一区二区三区在线观看 | 国产精品99久久久久久宅男| 色婷婷久久久综合中文字幕 | 欧美激情一区在线观看| 亚洲男人的天堂网| 久久99精品国产麻豆婷婷| a美女胸又www黄视频久久| 欧美老肥妇做.爰bbww视频| 久久久亚洲欧洲日产国码αv| 亚洲激情图片一区| 精彩视频一区二区| 欧美三级乱人伦电影| 国产精品久久久一本精品| 婷婷成人激情在线网| 99久久精品免费观看| 精品日韩欧美在线| 亚洲国产精品久久人人爱| 成人免费高清在线| 日韩一区二区三区在线视频| 亚洲男人的天堂一区二区| 国产精品自在在线| 91精品国产综合久久福利 | 亚洲无线码一区二区三区| 风间由美一区二区三区在线观看| 91精品国产综合久久久久| 国产精品高潮呻吟久久| 国产精品69毛片高清亚洲| 日韩一区二区三区四区五区六区| 亚洲五月六月丁香激情| 色综合天天综合| 国产精品美女一区二区在线观看| 精品亚洲成av人在线观看| 欧美一区二区三区啪啪| 偷偷要91色婷婷| 欧美精品一卡二卡| 午夜久久电影网| 5月丁香婷婷综合| 午夜av电影一区| 欧美丰满一区二区免费视频| 一区二区三区欧美亚洲| 91浏览器在线视频| 亚洲激情图片qvod| 色又黄又爽网站www久久| 国产精品国产精品国产专区不蜜| 成人91在线观看| 亚洲女同女同女同女同女同69| 色综合一区二区| 亚洲在线成人精品| 欧美久久久久久久久久| 亚洲成人7777| 欧美高清视频在线高清观看mv色露露十八 | 欧美一区永久视频免费观看| 亚洲国产精品一区二区尤物区| 精品视频一区二区三区免费| 亚洲成av人片在线| 91精品久久久久久久久99蜜臂| 日产欧产美韩系列久久99| 在线成人高清不卡| 久久99精品久久久久久国产越南| 久久午夜老司机| www.日韩av| 亚洲国产精品精华液网站| 91精品国产综合久久国产大片| 麻豆专区一区二区三区四区五区| 久久―日本道色综合久久| 不卡视频一二三| 性做久久久久久久免费看| 欧美大片国产精品| 成人精品高清在线| 首页国产丝袜综合| 日本一区二区三区高清不卡| 91极品视觉盛宴| 国产一区 二区 三区一级| 中文字幕在线免费不卡| 777a∨成人精品桃花网| 国产jizzjizz一区二区| 午夜精品久久久久影视| 国产亚洲欧美色| 在线观看av不卡| 国产一区999| 亚洲网友自拍偷拍| 久久精品日韩一区二区三区| 日本高清成人免费播放| 久久99国内精品| 曰韩精品一区二区| 2023国产精品| 欧美喷水一区二区| 国产91综合网| 九一九一国产精品| 亚洲午夜久久久久久久久久久| 久久一二三国产| 欧美一卡在线观看| 色噜噜夜夜夜综合网| 国产成人欧美日韩在线电影| 日韩福利视频网| 亚洲成av人片观看| 亚洲人成7777| 国产色一区二区| 91精品国产免费| 精品1区2区3区| 色先锋资源久久综合| 国产不卡视频在线观看| 麻豆久久久久久久| 亚洲成人精品影院| 一区二区三区欧美在线观看| 亚洲欧洲日产国码二区| 国产欧美久久久精品影院| 日韩欧美精品在线| 日韩欧美中文字幕公布| 欧美精品777| 337p亚洲精品色噜噜狠狠| 日本高清不卡在线观看| 一本大道久久精品懂色aⅴ | 日本韩国欧美在线| 成人免费毛片嘿嘿连载视频| 国产精华液一区二区三区| 秋霞av亚洲一区二区三| 日韩黄色小视频| 青娱乐精品在线视频| 日韩黄色免费网站| 蜜桃视频第一区免费观看| 日韩国产欧美三级| 日本视频一区二区三区| 久久国产精品免费| 狠狠色丁香久久婷婷综合_中| 精品亚洲porn| 成人a区在线观看| 95精品视频在线| 欧美网站大全在线观看| 欧美男人的天堂一二区| 91麻豆精品国产综合久久久久久| 日韩欧美黄色影院| 久久久久久久综合色一本| 国产精品色一区二区三区| 国产精品福利一区二区| 亚洲一区二区三区四区中文字幕| 亚洲综合色在线| 麻豆一区二区在线| 国产成人av电影免费在线观看| 91蜜桃网址入口| 欧美精品色综合| 精品成人一区二区| 国产精品国产三级国产有无不卡 | 国产麻豆精品95视频| 波多野结衣亚洲一区| 欧美性高清videossexo| 日韩午夜激情视频| 国产精品乱人伦一区二区| 亚洲成av人片在线观看| 精品一区二区久久久| jlzzjlzz欧美大全| 欧美日韩国产一区| 久久亚洲综合av| 亚洲国产成人av| 国产精品自在在线| 欧美精品日日鲁夜夜添| 久久久久高清精品| 亚洲成人免费在线| 成人丝袜视频网| 欧美一区二区三区四区久久 | 欧美视频一二三区| 久久亚洲影视婷婷| 香蕉加勒比综合久久| 国产 日韩 欧美大片| 91精选在线观看|