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

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

?? inflate.c

?? LINUX1.0源代碼,代碼條理清晰
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
#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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美videossexotv100| 欧美色综合网站| 91麻豆精品国产91久久久久久久久| 久久久亚洲精品一区二区三区| 亚洲制服丝袜av| 成人高清免费在线播放| 精品国产在天天线2019| 天天综合日日夜夜精品| 色综合天天综合色综合av | 成人h动漫精品一区二区| 7777精品伊人久久久大香线蕉完整版| 国产精品久久久久天堂| 国产一区视频网站| 日韩三级高清在线| 日韩av不卡一区二区| 色婷婷综合久久久久中文| 中文字幕免费在线观看视频一区| 蜜桃91丨九色丨蝌蚪91桃色| 欧美日韩国产a| 亚洲猫色日本管| 99精品久久久久久| 久久无码av三级| 麻豆成人免费电影| 欧美日韩色一区| 亚洲激情一二三区| 一本一本大道香蕉久在线精品| 中文字幕欧美日韩一区| 国产一区二区在线看| 日韩欧美黄色影院| 蜜桃av一区二区在线观看| 在线播放亚洲一区| 午夜精品国产更新| 欧美日韩成人综合天天影院 | 精品少妇一区二区三区在线视频| 午夜av一区二区三区| 欧美调教femdomvk| 亚洲一区二区视频在线观看| 色婷婷激情一区二区三区| 亚洲美女免费视频| 欧美亚洲另类激情小说| 亚洲已满18点击进入久久| 欧美专区亚洲专区| 亚洲午夜在线视频| 欧美在线三级电影| 午夜精品一区在线观看| 91精品免费在线| 毛片av一区二区| 日韩视频一区二区三区在线播放| 久久精品国产99久久6| 久久婷婷色综合| 国产成人一级电影| 国产精品久久综合| 91免费视频网| 亚洲高清免费观看| 日韩午夜三级在线| 国产乱码一区二区三区| 亚洲国产激情av| 色综合久久天天综合网| 亚洲一二三四久久| 欧美一区二区不卡视频| 精品影院一区二区久久久| 国产欧美一区二区精品性色超碰 | 国内成+人亚洲+欧美+综合在线| 久久精品网站免费观看| 波多野结衣在线aⅴ中文字幕不卡| 最好看的中文字幕久久| 在线观看日韩电影| 美女视频一区二区| 日本一区二区三区国色天香| 99国内精品久久| 亚洲高清三级视频| 26uuu亚洲婷婷狠狠天堂| 99视频超级精品| 亚洲午夜一区二区| 日韩美一区二区三区| 成人污视频在线观看| 一区二区三区日韩欧美精品| 欧美一区二区日韩| 成人免费三级在线| 亚洲成人你懂的| 精品福利av导航| 色婷婷激情久久| 麻豆中文一区二区| 国产一区二区中文字幕| 亚洲精品欧美激情| 日韩一级在线观看| 成人精品高清在线| 亚洲成va人在线观看| 国产亚洲视频系列| 欧美日本一区二区| 国产高清精品久久久久| 夜夜亚洲天天久久| 久久久久久久国产精品影院| 色域天天综合网| 久久不见久久见中文字幕免费| 国产精品国产a级| 日韩精品一区二区三区四区| bt欧美亚洲午夜电影天堂| 日韩国产高清在线| **性色生活片久久毛片| 日韩一区二区三区视频在线 | 久久福利资源站| 亚洲精品美国一| 久久久久久99精品| 欧美丰满嫩嫩电影| 99久久er热在这里只有精品15| 日韩精品三区四区| 1024成人网| 久久精品男人天堂av| 欧美日韩国产综合一区二区三区 | 久久国产综合精品| 亚洲精品少妇30p| 国产欧美日韩视频一区二区| 欧美福利电影网| 91浏览器在线视频| 国产精品一级片| 日韩综合在线视频| 亚洲精品日韩一| 国产欧美精品区一区二区三区 | 91精品国产综合久久香蕉麻豆| 北条麻妃国产九九精品视频| 韩国欧美一区二区| 日韩国产精品大片| 亚洲国产日韩a在线播放性色| 国产视频不卡一区| 欧美成人精品1314www| 欧美视频在线观看一区二区| 91欧美激情一区二区三区成人| 国产精品自拍一区| 久热成人在线视频| 天天色天天操综合| 一区二区三区国产| 国产精品国产三级国产普通话蜜臀| 欧美精品一区二区精品网| 欧美蜜桃一区二区三区| 在线视频一区二区三| 91蝌蚪porny九色| 成人晚上爱看视频| 国产九色sp调教91| 精品一区二区综合| 久久99精品久久久久久国产越南| 天天爽夜夜爽夜夜爽精品视频| 亚洲一区二区黄色| 亚洲主播在线观看| 亚洲小说春色综合另类电影| 一级做a爱片久久| 亚洲免费在线播放| 亚洲人xxxx| 亚洲精品成人精品456| 亚洲精品乱码久久久久久| 欧美无砖砖区免费| 亚洲第一主播视频| 亚洲资源中文字幕| 亚洲成av人片www| 亚洲成av人片一区二区| 午夜精品久久久久影视| 视频一区在线播放| 日本午夜一本久久久综合| 日产国产欧美视频一区精品| 日韩精品每日更新| 秋霞国产午夜精品免费视频| 视频在线观看国产精品| 蜜桃一区二区三区在线观看| 免费成人av资源网| 国产在线播精品第三| 国产一区二区在线电影| 丁香婷婷综合激情五月色| 成人美女视频在线观看| 91网站黄www| 欧美亚洲动漫精品| 91精品国产综合久久蜜臀| 日韩欧美国产成人一区二区| 亚洲精品一区二区精华| 亚洲国产精品高清| 最新不卡av在线| 亚洲成人激情综合网| 日韩黄色免费电影| 国内精品久久久久影院薰衣草| 成人三级在线视频| 色香色香欲天天天影视综合网| 欧美日韩精品一区二区| 欧美一区二区免费| 国产午夜亚洲精品理论片色戒| 国产精品理论片| 一二三四社区欧美黄| 日本免费在线视频不卡一不卡二 | 夜夜揉揉日日人人青青一国产精品| 五月天激情综合| 极品少妇xxxx偷拍精品少妇| 成人性生交大片免费看视频在线 | aaa欧美日韩| 欧美日韩中文字幕一区二区| 日韩一级片在线观看| 久久久久国产精品人| 亚洲精品国久久99热| 蜜桃一区二区三区在线| voyeur盗摄精品| 欧美一区二区三区思思人| 日本一区二区成人| 午夜私人影院久久久久|