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

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

?? inflate.c

?? LINUX1.0源代碼,代碼條理清晰
?? C
?? 第 1 頁 / 共 2 頁
字號:
#define DEBG(x)
#define DEBG1(x)
/* inflate.c -- Not copyrighted 1992 by Mark Adler
   version c10p1, 10 January 1993 */

/* 
 * Adapted for booting Linux by Hannu Savolainen 1993
 * based on gzip-1.0.3 
 */

#ifndef lint
static char rcsid[] = "$Id: inflate.c,v 0.10 1993/02/04 13:21:06 jloup Exp $";
#endif

#include "gzip.h"
#define slide window

#if defined(STDC_HEADERS) || defined(HAVE_STDLIB_H)
#  include <sys/types.h>
#  include <stdlib.h>
#endif

struct huft {
  uch e;                /* number of extra bits or operation */
  uch b;                /* number of bits in this code or subcode */
  union {
    ush n;              /* literal, length base, or distance base */
    struct huft *t;     /* pointer to next level of table */
  } v;
};


/* Function prototypes */
int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
                   struct huft **, int *));
int huft_free OF((struct huft *));
int inflate_codes OF((struct huft *, struct huft *, int, int));
int inflate_stored OF((void));
int inflate_fixed OF((void));
int inflate_dynamic OF((void));
int inflate_block OF((int *));
int inflate OF((void));


#define wp outcnt
#define flush_output(w) (wp=(w),flush_window())

/* Tables for deflate from PKZIP's appnote.txt. */
static unsigned border[] = {    /* Order of the bit length code lengths */
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
static ush cplens[] = {         /* 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};
        /* note: see note #13 above about the 258 in this list. */
static ush cplext[] = {         /* 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, 99, 99}; /* 99==invalid */
static ush cpdist[] = {         /* 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};
static ush cpdext[] = {         /* 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};


ulg bb;                         /* bit buffer */
unsigned bk;                    /* bits in bit buffer */

ush mask_bits[] = {
    0x0000,
    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
};

#ifdef CRYPT
  uch cc;
#  define NEXTBYTE() \
     (decrypt ? (cc = get_byte(), zdecode(cc), cc) : get_byte())
#else
#  define NEXTBYTE()  (uch)get_byte()
#endif
#define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
#define DUMPBITS(n) {b>>=(n);k-=(n);}

int lbits = 9;          /* bits in base literal/length lookup table */
int dbits = 6;          /* bits in base distance lookup table */


/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */
#define BMAX 16         /* maximum bit length of any code (16 for explode) */
#define N_MAX 288       /* maximum number of codes in any set */


unsigned hufts;         /* track memory usage */


int huft_build(b, n, s, d, e, t, m)
unsigned *b;            /* code lengths in bits (all assumed <= BMAX) */
unsigned n;             /* number of codes (assumed <= N_MAX) */
unsigned s;             /* number of simple-valued codes (0..s-1) */
ush *d;                 /* list of base values for non-simple codes */
ush *e;                 /* list of extra bits for non-simple codes */
struct huft **t;        /* result: starting table */
int *m;                 /* maximum lookup bits, returns actual */
/* Given a list of code lengths and a maximum table size, make a set of
   tables to decode that set of codes.  Return zero on success, one if
   the given code set is incomplete (the tables are still built in this
   case), two if the input is invalid (all zero length codes or an
   oversubscribed set of lengths), and three if not enough memory. */
{
  unsigned a;                   /* counter for codes of length k */
  unsigned c[BMAX+1];           /* bit length count table */
  unsigned f;                   /* i repeats in table every f entries */
  int g;                        /* maximum code length */
  int h;                        /* table level */
  register unsigned i;          /* counter, current code */
  register unsigned j;          /* counter */
  register int k;               /* number of bits in current code */
  int l;                        /* bits per table (returned in m) */
  register unsigned *p;         /* pointer into c[], b[], or v[] */
  register struct huft *q;      /* points to current table */
  struct huft r;                /* table entry for structure assignment */
  struct huft *u[BMAX];         /* table stack */
  unsigned v[N_MAX];            /* values in order of bit length */
  register int w;               /* bits before this table == (l * h) */
  unsigned x[BMAX+1];           /* bit offsets, then code stack */
  unsigned *xp;                 /* pointer into x */
  int y;                        /* number of dummy codes added */
  unsigned z;                   /* number of entries in current table */

DEBG("huft1 ");

  /* Generate counts for each bit length */
  memzero(c, sizeof(c));
  p = b;  i = n;
  do {
    c[*p++]++;                  /* assume all entries <= BMAX */
  } while (--i);
  if (c[0] == n)                /* null input--all zero length codes */
  {
    *t = (struct huft *)NULL;
    *m = 0;
    return 0;
  }

DEBG("huft2 ");

  /* 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 ((unsigned)l < j)
    l = j;
  for (i = BMAX; i; i--)
    if (c[i])
      break;
  g = i;                        /* maximum code length */
  if ((unsigned)l > i)
    l = i;
  *m = l;

DEBG("huft3 ");

  /* 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 2;                 /* bad input: more codes than bits */
  if ((y -= c[i]) < 0)
    return 2;
  c[i] += y;

DEBG("huft4 ");

  /* 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++);
  }

DEBG("huft5 ");

  /* 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);

DEBG("h6 ");

  /* 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] = (struct huft *)NULL;   /* just to keep compilers happy */
  q = (struct huft *)NULL;      /* ditto */
  z = 0;                        /* ditto */
DEBG("h6a ");

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

        /* compute minimum size table less than or equal to l bits */
        z = (z = g - w) > (unsigned)l ? l : z;  /* upper limit on table size */
        if ((f = 1 << (j = k - w)) > a + 1)     /* try a k-w bit table */
        {                       /* too few codes for k-w bit table */
DEBG1("2 ");
          f -= a + 1;           /* deduct codes from patterns left */
          xp = c + k;
          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 */
          }
        }
DEBG1("3 ");
        z = 1 << j;             /* table entries for j-bit table */

        /* allocate and link in new table */
        if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) ==
            (struct huft *)NULL)
        {
DEBG1("31 ");
	  error("malloc failed\n");
          if (h)
            huft_free(u[0]);
          return 3;             /* not enough memory */
        }
DEBG1("4 ");
        hufts += z + 1;         /* track memory usage */
        *t = q + 1;             /* link to list for huft_free() */
        *(t = &(q->v.t)) = (struct huft *)NULL;
        u[h] = ++q;             /* table starts after link */

DEBG1("5 ");
        /* connect to last table, if there is one */
        if (h)
        {
          x[h] = i;             /* save pattern for backing up */
          r.b = (uch)l;         /* bits to dump before this table */
          r.e = (uch)(16 + j);  /* bits in this table */
          r.v.t = q;            /* pointer to this table */
          j = i >> (w - l);     /* (get around Turbo C bug) */
          u[h-1][j] = r;        /* connect to last table */
        }
DEBG1("6 ");
      }
DEBG("h6c ");

      /* set up table entry in r */
      r.b = (uch)(k - w);
      if (p >= v + n)
        r.e = 99;               /* out of values--invalid code */
      else if (*p < s)
      {
        r.e = (uch)(*p < 256 ? 16 : 15);    /* 256 is end-of-block code */
        r.v.n = *p++;           /* simple code is just the value */
      }
      else
      {
        r.e = (uch)e[*p - s];   /* non-simple--look up in lists */
        r.v.n = d[*p++ - s];
      }
DEBG("h6d ");

      /* fill code-like entries with r */
      f = 1 << (k - w);
      for (j = i >> w; j < z; j += f)
        q[j] = r;

      /* backwards increment the k-bit code i */
      for (j = 1 << (k - 1); i & j; j >>= 1)
        i ^= j;
      i ^= j;

      /* backup over finished tables */
      while ((i & ((1 << w) - 1)) != x[h])
      {
        h--;                    /* don't need to update q */
        w -= l;
      }
DEBG("h6e ");
    }
DEBG("h6f ");
  }

DEBG("huft7 ");

  /* Return true (1) if we were given an incomplete table */
  return y != 0 && g != 1;
}



int huft_free(t)
struct huft *t;         /* table to free */
/* Free the malloc'ed tables built by huft_build(), which makes a linked
   list of the tables it made, with the links in a dummy first entry of
   each table. */
{
  register struct huft *p, *q;


  /* Go through linked list, freeing from the malloced (t[-1]) address. */
  p = t;
  while (p != (struct huft *)NULL)
  {
    q = (--p)->v.t;
    free(p);
    p = q;
  } 
  return 0;
}


int inflate_codes(tl, td, bl, bd)
struct huft *tl, *td;   /* literal/length and distance decoder tables */
int bl, bd;             /* number of bits decoded by tl[] and td[] */
/* inflate (decompress) the codes in a deflated (compressed) block.
   Return an error code or zero if it all goes ok. */
{
  register unsigned e;  /* table entry flag/number of extra bits */
  unsigned n, d;        /* length and index for copy */
  unsigned w;           /* current window position */
  struct huft *t;       /* pointer to table entry */
  unsigned ml, md;      /* masks for bl and bd bits */
  register ulg b;       /* bit buffer */
  register unsigned k;  /* number of bits in bit buffer */


  /* make local copies of globals */
  b = bb;                       /* initialize bit buffer */
  k = bk;
  w = wp;                       /* initialize window position */

  /* inflate the coded data */
  ml = mask_bits[bl];           /* precompute masks for speed */
  md = mask_bits[bd];
  for (;;)                      /* do until end of block */
  {
    NEEDBITS((unsigned)bl)
    if ((e = (t = tl + ((unsigned)b & ml))->e) > 16)
      do {
        if (e == 99)
          return 1;
        DUMPBITS(t->b)
        e -= 16;
        NEEDBITS(e)
      } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
    DUMPBITS(t->b)
    if (e == 16)                /* then it's a literal */
    {
      slide[w++] = (uch)t->v.n;
      if (w == WSIZE)
      {
        flush_output(w);
        w = 0;
      }
    }
    else                        /* it's an EOB or a length */
    {
      /* exit if end of block */
      if (e == 15)
        break;

      /* get length of block to copy */
      NEEDBITS(e)
      n = t->v.n + ((unsigned)b & mask_bits[e]);
      DUMPBITS(e);

      /* decode distance of block to copy */
      NEEDBITS((unsigned)bd)
      if ((e = (t = td + ((unsigned)b & md))->e) > 16)
        do {
          if (e == 99)
            return 1;
          DUMPBITS(t->b)
          e -= 16;
          NEEDBITS(e)
        } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16);
      DUMPBITS(t->b)
      NEEDBITS(e)
      d = w - t->v.n - ((unsigned)b & mask_bits[e]);
      DUMPBITS(e)

      /* do the copy */
      do {
        n -= (e = (e = WSIZE - ((d &= WSIZE-1) > w ? d : w)) > n ? n : e);
#if !defined(NOMEMCPY) && !defined(DEBUG)
        if (w - d >= e)         /* (this test assumes unsigned comparison) */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人片在线观看中文| 国产呦精品一区二区三区网站| 884aa四虎影成人精品一区| 国产综合久久久久久久久久久久| 亚洲黄色免费电影| 国产无人区一区二区三区| 欧美久久久久久蜜桃| 91香蕉视频mp4| 国产毛片精品视频| 日本强好片久久久久久aaa| 亚洲欧美偷拍三级| 国产精品免费网站在线观看| 精品少妇一区二区三区免费观看| 欧美优质美女网站| 99久久国产综合精品女不卡| 狠狠色丁香久久婷婷综合丁香| 亚洲国产精品一区二区久久恐怖片| 欧美国产日韩在线观看| 久久综合久久99| 日韩女优av电影在线观看| 欧美精品tushy高清| 欧美亚洲自拍偷拍| 欧美主播一区二区三区美女| av电影在线观看完整版一区二区| 精品一区二区三区久久久| 日韩精品免费视频人成| 亚洲观看高清完整版在线观看| 日韩理论片中文av| 中文字幕亚洲成人| 日本一区二区成人在线| 久久九九国产精品| 国产欧美一区二区精品婷婷| 久久一留热品黄| 久久久精品免费观看| 久久影视一区二区| 国产亚洲一区字幕| 日本一区二区三级电影在线观看| www日韩大片| 日韩精品资源二区在线| 日韩一区二区高清| 精品久久久久久综合日本欧美| 欧美videossexotv100| 欧美va亚洲va| 国产亚洲欧美日韩俺去了| 国产拍欧美日韩视频二区| 中文字幕不卡的av| 亚洲欧美偷拍卡通变态| 亚洲风情在线资源站| 天天色图综合网| 免费观看成人鲁鲁鲁鲁鲁视频| 看片网站欧美日韩| 国产精品综合久久| 播五月开心婷婷综合| 色综合激情久久| 欧美精品丝袜久久久中文字幕| 欧美一区二区精美| 久久综合九色综合97婷婷女人| 久久精品人人做人人综合| 亚洲欧美综合网| 亚洲午夜成aⅴ人片| 久久99这里只有精品| 国产白丝精品91爽爽久久| 91免费视频网址| 欧美日本韩国一区二区三区视频 | 欧美日韩在线综合| 欧美精品三级在线观看| 欧美变态口味重另类| 中文av字幕一区| 亚洲综合自拍偷拍| 久久99热这里只有精品| www.欧美日韩| 欧美老肥妇做.爰bbww视频| 久久亚洲欧美国产精品乐播| 一色桃子久久精品亚洲| 亚洲电影激情视频网站| 蜜臀久久久99精品久久久久久| 国产成人精品一区二| 欧美性大战久久久久久久蜜臀| 精品福利一区二区三区免费视频| 国产精品久久久一本精品| 日本成人在线电影网| 高清国产一区二区三区| 欧美日韩高清在线| 国产欧美一区在线| 石原莉奈一区二区三区在线观看| 国产福利一区二区| 欧美女孩性生活视频| 国产欧美一区二区精品忘忧草 | 国产精品女主播在线观看| 亚洲国产精品人人做人人爽| 久久99久久99小草精品免视看| 91亚洲精品一区二区乱码| 欧美成人女星排名| 亚洲精品乱码久久久久久久久| 欧美色偷偷大香| 久久久久久久久99精品| 日本视频中文字幕一区二区三区| jlzzjlzz国产精品久久| 精品91自产拍在线观看一区| 一区二区三区国产豹纹内裤在线| 国产一区二区三区蝌蚪| 91精品国产综合久久福利| 亚洲精品视频一区二区| 国产成人免费网站| 日韩精品在线一区二区| 亚洲一区二区四区蜜桃| 成人av电影免费在线播放| 欧美videossexotv100| 丝袜亚洲精品中文字幕一区| 波多野洁衣一区| 久久九九99视频| 久久疯狂做爰流白浆xx| 这里只有精品视频在线观看| 一区二区三区在线高清| 成人a级免费电影| 国产三级一区二区三区| 久久精品国产在热久久| 91精品国产91久久综合桃花| 亚洲永久精品国产| 色丁香久综合在线久综合在线观看| 欧美经典一区二区| 国产成人亚洲综合a∨猫咪 | 亚洲精品欧美在线| www.亚洲国产| 国产精品久久久久久久第一福利| 国产成人无遮挡在线视频| 久久午夜国产精品| 激情综合网最新| 精品欧美一区二区在线观看| 蜜臀av性久久久久蜜臀aⅴ| 91精品国产综合久久精品图片| 亚洲一区二区黄色| 欧美日韩国产经典色站一区二区三区 | 水野朝阳av一区二区三区| 欧美手机在线视频| 亚洲国产一区二区a毛片| 欧美亚洲愉拍一区二区| 亚洲电影中文字幕在线观看| 在线看不卡av| 首页国产欧美久久| 日韩色在线观看| 精品一区二区三区免费播放| 久久综合色8888| 大胆欧美人体老妇| 中文字幕中文字幕在线一区 | 蜜桃av噜噜一区| 91麻豆精品国产自产在线观看一区| 亚洲高清不卡在线| 3d动漫精品啪啪1区2区免费| 日本欧洲一区二区| 久久精品在线观看| 成人av网址在线观看| 亚洲美女偷拍久久| 在线观看av一区| 美女视频网站黄色亚洲| 久久久三级国产网站| 成人精品国产一区二区4080| 亚洲人123区| 欧美一区日本一区韩国一区| 寂寞少妇一区二区三区| 中文一区在线播放| 欧美视频在线一区| 精品综合久久久久久8888| 国产亚洲欧美日韩在线一区| 91丨porny丨在线| 日本美女一区二区三区视频| 久久精品人人做人人爽人人| 色婷婷国产精品| 奇米色一区二区| 国产精品视频免费| 欧美日韩另类国产亚洲欧美一级| 韩国av一区二区三区| 亚洲人123区| 精品少妇一区二区三区日产乱码| 99综合影院在线| 免费在线观看精品| 亚洲欧美自拍偷拍色图| 91精品午夜视频| 99精品视频一区| 久久国产精品第一页| 亚洲免费观看在线视频| 精品久久久久久久久久久院品网| 91污在线观看| 国产一区二区免费视频| 夜夜亚洲天天久久| 久久欧美中文字幕| 欧美日韩高清一区二区不卡| 国产成人免费在线视频| 日韩精品五月天| 一区二区三区自拍| 国产欧美一二三区| 6080午夜不卡| 91美女片黄在线观看91美女| 久久精品999| 水蜜桃久久夜色精品一区的特点| 国产精品麻豆视频| 精品福利一区二区三区| 国产成人午夜精品影院观看视频| 天堂成人国产精品一区| 亚洲美女在线一区|