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

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

?? infblock.c

?? p2p技術C源代碼.rar
?? C
字號:
/* infblock.c -- interpret and process block types to last block
 * Copyright (C) 1995-2002 Mark Adler
 * For conditions of distribution and use, see copyright notice in zlib.h 
 */

#include "zutil.h"
#include "infblock.h"
#include "inftrees.h"
#include "infcodes.h"
#include "infutil.h"

struct inflate_codes_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

/* Table for deflate from PKZIP's appnote.txt. */
local const uInt 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};

/*
   Notes beyond the 1.93a appnote.txt:

   1. Distance pointers never point before the beginning of the output
      stream.
   2. Distance pointers can point back across blocks, up to 32k away.
   3. There is an implied maximum of 7 bits for the bit length table and
      15 bits for the actual data.
   4. If only one code exists, then it is encoded using one bit.  (Zero
      would be more efficient, but perhaps a little confusing.)  If two
      codes exist, they are coded using one bit each (0 and 1).
   5. There is no way of sending zero distance codes--a dummy must be
      sent if there are none.  (History: a pre 2.0 version of PKZIP would
      store blocks with no distance codes, but this was discovered to be
      too harsh a criterion.)  Valid only for 1.93a.  2.04c does allow
      zero distance codes, which is sent as one code of zero bits in
      length.
   6. There are up to 286 literal/length codes.  Code 256 represents the
      end-of-block.  Note however that the static length tree defines
      288 codes just to fill out the Huffman codes.  Codes 286 and 287
      cannot be used though, since there is no length base or extra bits
      defined for them.  Similarily, there are up to 30 distance codes.
      However, static trees define 32 codes (all 5 bits) to fill out the
      Huffman codes, but the last two had better not show up in the data.
   7. Unzip can check dynamic Huffman blocks for complete code sets.
      The exception is that a single code would not be complete (see #4).
   8. The five bits following the block type is really the number of
      literal codes sent minus 257.
   9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits
      (1+6+6).  Therefore, to output three times the length, you output
      three codes (1+1+1), whereas to output four times the same length,
      you only need two codes (1+3).  Hmm.
  10. In the tree reconstruction algorithm, Code = Code + Increment
      only if BitLength(i) is not zero.  (Pretty obvious.)
  11. Correction: 4 Bits: # of Bit Length codes - 4     (4 - 19)
  12. Note: length code 284 can represent 227-258, but length code 285
      really is 258.  The last length deserves its own, short code
      since it gets used a lot in very redundant files.  The length
      258 is special since 258 - 3 (the min match length) is 255.
  13. The literal/length and distance code bit lengths are read as a
      single stream of lengths.  It is possible (and advantageous) for
      a repeat code (16, 17, or 18) to go across the boundary between
      the two sets of lengths.
 */


void inflate_blocks_reset(s, z, c)
inflate_blocks_statef *s;
z_streamp z;
uLongf *c;
{
  if (c != Z_NULL)
    *c = s->check;
  if (s->mode == BTREE || s->mode == DTREE)
    ZFREE(z, s->sub.trees.blens);
  if (s->mode == CODES)
    inflate_codes_free(s->sub.decode.codes, z);
  s->mode = TYPE;
  s->bitk = 0;
  s->bitb = 0;
  s->read = s->write = s->window;
  if (s->checkfn != Z_NULL)
    z->adler = s->check = (*s->checkfn)(0L, (const Bytef *)Z_NULL, 0);
  Tracev((stderr, "inflate:   blocks reset\n"));
}


inflate_blocks_statef *inflate_blocks_new(z, c, w)
z_streamp z;
check_func c;
uInt w;
{
  inflate_blocks_statef *s;

  if ((s = (inflate_blocks_statef *)ZALLOC
       (z,1,sizeof(struct inflate_blocks_state))) == Z_NULL)
    return s;
  if ((s->hufts =
       (inflate_huft *)ZALLOC(z, sizeof(inflate_huft), MANY)) == Z_NULL)
  {
    ZFREE(z, s);
    return Z_NULL;
  }
  if ((s->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
  {
    ZFREE(z, s->hufts);
    ZFREE(z, s);
    return Z_NULL;
  }
  s->end = s->window + w;
  s->checkfn = c;
  s->mode = TYPE;
  Tracev((stderr, "inflate:   blocks allocated\n"));
  inflate_blocks_reset(s, z, Z_NULL);
  return s;
}


int inflate_blocks(s, z, r)
inflate_blocks_statef *s;
z_streamp z;
int r;
{
  uInt t;               /* temporary storage */
  uLong b;              /* bit buffer */
  uInt k;               /* bits in bit buffer */
  Bytef *p;             /* input data pointer */
  uInt n;               /* bytes available there */
  Bytef *q;             /* output window write pointer */
  uInt m;               /* bytes to end of window or read pointer */

  /* copy input/output information to locals (UPDATE macro restores) */
  LOAD

  /* process input based on current state */
  while (1) switch (s->mode)
  {
    case TYPE:
      NEEDBITS(3)
      t = (uInt)b & 7;
      s->last = t & 1;
      switch (t >> 1)
      {
        case 0:                         /* stored */
          Tracev((stderr, "inflate:     stored block%s\n",
                 s->last ? " (last)" : ""));
          DUMPBITS(3)
          t = k & 7;                    /* go to byte boundary */
          DUMPBITS(t)
          s->mode = LENS;               /* get length of stored block */
          break;
        case 1:                         /* fixed */
          Tracev((stderr, "inflate:     fixed codes block%s\n",
                 s->last ? " (last)" : ""));
          {
            uInt bl, bd;
            inflate_huft *tl, *td;

            inflate_trees_fixed(&bl, &bd, &tl, &td, z);
            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
            if (s->sub.decode.codes == Z_NULL)
            {
              r = Z_MEM_ERROR;
              LEAVE
            }
          }
          DUMPBITS(3)
          s->mode = CODES;
          break;
        case 2:                         /* dynamic */
          Tracev((stderr, "inflate:     dynamic codes block%s\n",
                 s->last ? " (last)" : ""));
          DUMPBITS(3)
          s->mode = TABLE;
          break;
        case 3:                         /* illegal */
          DUMPBITS(3)
          s->mode = BAD;
          z->msg = (char*)"invalid block type";
          r = Z_DATA_ERROR;
          LEAVE
      }
      break;
    case LENS:
      NEEDBITS(32)
      if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
      {
        s->mode = BAD;
        z->msg = (char*)"invalid stored block lengths";
        r = Z_DATA_ERROR;
        LEAVE
      }
      s->sub.left = (uInt)b & 0xffff;
      b = k = 0;                      /* dump bits */
      Tracev((stderr, "inflate:       stored length %u\n", s->sub.left));
      s->mode = s->sub.left ? STORED : (s->last ? DRY : TYPE);
      break;
    case STORED:
      if (n == 0)
        LEAVE
      NEEDOUT
      t = s->sub.left;
      if (t > n) t = n;
      if (t > m) t = m;
      zmemcpy(q, p, t);
      p += t;  n -= t;
      q += t;  m -= t;
      if ((s->sub.left -= t) != 0)
        break;
      Tracev((stderr, "inflate:       stored end, %lu total out\n",
              z->total_out + (q >= s->read ? q - s->read :
              (s->end - s->read) + (q - s->window))));
      s->mode = s->last ? DRY : TYPE;
      break;
    case TABLE:
      NEEDBITS(14)
      s->sub.trees.table = t = (uInt)b & 0x3fff;
#ifndef PKZIP_BUG_WORKAROUND
      if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29)
      {
        s->mode = BAD;
        z->msg = (char*)"too many length or distance symbols";
        r = Z_DATA_ERROR;
        LEAVE
      }
#endif
      t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);
      if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL)
      {
        r = Z_MEM_ERROR;
        LEAVE
      }
      DUMPBITS(14)
      s->sub.trees.index = 0;
      Tracev((stderr, "inflate:       table sizes ok\n"));
      s->mode = BTREE;
    case BTREE:
      while (s->sub.trees.index < 4 + (s->sub.trees.table >> 10))
      {
        NEEDBITS(3)
        s->sub.trees.blens[border[s->sub.trees.index++]] = (uInt)b & 7;
        DUMPBITS(3)
      }
      while (s->sub.trees.index < 19)
        s->sub.trees.blens[border[s->sub.trees.index++]] = 0;
      s->sub.trees.bb = 7;
      t = inflate_trees_bits(s->sub.trees.blens, &s->sub.trees.bb,
                             &s->sub.trees.tb, s->hufts, z);
      if (t != Z_OK)
      {
        r = t;
        if (r == Z_DATA_ERROR)
        {
          ZFREE(z, s->sub.trees.blens);
          s->mode = BAD;
        }
        LEAVE
      }
      s->sub.trees.index = 0;
      Tracev((stderr, "inflate:       bits tree ok\n"));
      s->mode = DTREE;
    case DTREE:
      while (t = s->sub.trees.table,
             s->sub.trees.index < 258 + (t & 0x1f) + ((t >> 5) & 0x1f))
      {
        inflate_huft *h;
        uInt i, j, c;

        t = s->sub.trees.bb;
        NEEDBITS(t)
        h = s->sub.trees.tb + ((uInt)b & inflate_mask[t]);
        t = h->bits;
        c = h->base;
        if (c < 16)
        {
          DUMPBITS(t)
          s->sub.trees.blens[s->sub.trees.index++] = c;
        }
        else /* c == 16..18 */
        {
          i = c == 18 ? 7 : c - 14;
          j = c == 18 ? 11 : 3;
          NEEDBITS(t + i)
          DUMPBITS(t)
          j += (uInt)b & inflate_mask[i];
          DUMPBITS(i)
          i = s->sub.trees.index;
          t = s->sub.trees.table;
          if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
              (c == 16 && i < 1))
          {
            ZFREE(z, s->sub.trees.blens);
            s->mode = BAD;
            z->msg = (char*)"invalid bit length repeat";
            r = Z_DATA_ERROR;
            LEAVE
          }
          c = c == 16 ? s->sub.trees.blens[i - 1] : 0;
          do {
            s->sub.trees.blens[i++] = c;
          } while (--j);
          s->sub.trees.index = i;
        }
      }
      s->sub.trees.tb = Z_NULL;
      {
        uInt bl, bd;
        inflate_huft *tl, *td;
        inflate_codes_statef *c;

        bl = 9;         /* must be <= 9 for lookahead assumptions */
        bd = 6;         /* must be <= 9 for lookahead assumptions */
        t = s->sub.trees.table;
        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
                                  s->sub.trees.blens, &bl, &bd, &tl, &td,
                                  s->hufts, z);
        if (t != Z_OK)
        {
          if (t == (uInt)Z_DATA_ERROR)
          {
            ZFREE(z, s->sub.trees.blens);
            s->mode = BAD;
          }
          r = t;
          LEAVE
        }
        Tracev((stderr, "inflate:       trees ok\n"));
        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
        {
          r = Z_MEM_ERROR;
          LEAVE
        }
        s->sub.decode.codes = c;
      }
      ZFREE(z, s->sub.trees.blens);
      s->mode = CODES;
    case CODES:
      UPDATE
      if ((r = inflate_codes(s, z, r)) != Z_STREAM_END)
        return inflate_flush(s, z, r);
      r = Z_OK;
      inflate_codes_free(s->sub.decode.codes, z);
      LOAD
      Tracev((stderr, "inflate:       codes end, %lu total out\n",
              z->total_out + (q >= s->read ? q - s->read :
              (s->end - s->read) + (q - s->window))));
      if (!s->last)
      {
        s->mode = TYPE;
        break;
      }
      s->mode = DRY;
    case DRY:
      FLUSH
      if (s->read != s->write)
        LEAVE
      s->mode = DONE;
    case DONE:
      r = Z_STREAM_END;
      LEAVE
    case BAD:
      r = Z_DATA_ERROR;
      LEAVE
    default:
      r = Z_STREAM_ERROR;
      LEAVE
  }
}


int inflate_blocks_free(s, z)
inflate_blocks_statef *s;
z_streamp z;
{
  inflate_blocks_reset(s, z, Z_NULL);
  ZFREE(z, s->window);
  ZFREE(z, s->hufts);
  ZFREE(z, s);
  Tracev((stderr, "inflate:   blocks freed\n"));
  return Z_OK;
}


void inflate_set_dictionary(s, d, n)
inflate_blocks_statef *s;
const Bytef *d;
uInt  n;
{
  zmemcpy(s->window, d, n);
  s->read = s->write = s->window + n;
}


/* Returns true if inflate is currently at the end of a block generated
 * by Z_SYNC_FLUSH or Z_FULL_FLUSH. 
 * IN assertion: s != Z_NULL
 */
int inflate_blocks_sync_point(s)
inflate_blocks_statef *s;
{
  return s->mode == LENS;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级高清大全免费观看| 久久精品亚洲精品国产欧美kt∨| 538在线一区二区精品国产| 91麻豆精品国产91久久久使用方法 | 国产精品美女视频| 亚洲美女电影在线| 久草这里只有精品视频| 91免费在线看| 久久亚洲欧美国产精品乐播| 亚洲影院在线观看| 国产精品99久久久久久久女警 | 亚洲美女视频在线观看| 另类小说图片综合网| 99麻豆久久久国产精品免费优播| 91麻豆精品国产91久久久资源速度| 日本一区二区三区久久久久久久久不| 亚洲一区二区三区中文字幕在线| 国产一区二区三区黄视频| 丁香啪啪综合成人亚洲小说 | 一区二区三区国产精华| 国产麻豆视频精品| 欧美一区二区私人影院日本| 亚洲欧美韩国综合色| 国产一区二区中文字幕| 欧美一区二区三级| 夜夜爽夜夜爽精品视频| 成人精品免费视频| 欧美性做爰猛烈叫床潮| 自拍偷在线精品自拍偷无码专区 | 亚洲免费在线视频| 从欧美一区二区三区| 精品久久久久av影院| 亚洲综合免费观看高清完整版| 高清国产午夜精品久久久久久| 精品欧美一区二区在线观看| 日韩成人精品在线观看| 色婷婷综合久久久久中文一区二区| 国产人成亚洲第一网站在线播放| 久久激情综合网| 91精品国产入口在线| 视频一区视频二区中文| 欧美日韩的一区二区| 中文字幕在线不卡| 91在线国产福利| 亚洲人成精品久久久久久| 国产69精品久久久久毛片| 欧美a级理论片| 色诱视频网站一区| 亚洲伦在线观看| 成人爱爱电影网址| 国产精品嫩草99a| 95精品视频在线| 亚洲一区自拍偷拍| 91精品国产综合久久久久久久| 视频一区视频二区在线观看| 欧美成人国产一区二区| 国产v综合v亚洲欧| 一区二区三区欧美激情| 欧美老年两性高潮| 国产精品夜夜嗨| 亚洲欧美色图小说| 欧美成人一区二区| 91亚洲永久精品| 美女在线视频一区| 国产精品色眯眯| 欧美日韩国产一区| 国产精品1区2区3区在线观看| 亚洲男帅同性gay1069| 7777女厕盗摄久久久| 国产成人免费av在线| 亚洲午夜日本在线观看| 久久亚洲影视婷婷| 欧美性感一区二区三区| 国产精一区二区三区| 亚洲国产精品人人做人人爽| 国产婷婷色一区二区三区| 欧美视频在线一区| 国产91精品精华液一区二区三区 | 精品一区二区三区av| 国产精品久久久久婷婷| 欧美一区二区观看视频| 色综合久久88色综合天天6| 国产一区二区按摩在线观看| 亚洲自拍另类综合| 欧美国产精品中文字幕| 精品久久人人做人人爰| 欧美日韩精品一区二区三区| 色综合一个色综合亚洲| 国产大陆a不卡| 久久99久久久欧美国产| 亚洲成av人片在线| 亚洲男人的天堂在线aⅴ视频| 国产日韩欧美一区二区三区乱码| 欧美日韩激情一区二区| 日本道精品一区二区三区| 成人国产免费视频| 国产成人av电影在线观看| 久久精品国产成人一区二区三区| 亚洲线精品一区二区三区| 亚洲人成影院在线观看| 国产精品久久久久精k8| 国产三级精品三级在线专区| 久久夜色精品一区| 欧美精品一区二| 337p日本欧洲亚洲大胆色噜噜| 日韩欧美国产午夜精品| 4438x亚洲最大成人网| 538在线一区二区精品国产| 777xxx欧美| 欧美一区二区三区四区五区| 欧美一区二区三区的| 欧美一区二区视频在线观看2020 | 欧美激情中文字幕一区二区| 2019国产精品| 久久久一区二区三区捆绑**| 欧美精品一区二区三区蜜桃视频 | 欧美mv和日韩mv国产网站| 欧美成人a在线| 26uuu色噜噜精品一区| 久久久久亚洲蜜桃| 国产女人aaa级久久久级 | 久久精品亚洲麻豆av一区二区| 久久丝袜美腿综合| 久久精品一区四区| 亚洲婷婷综合久久一本伊一区| 亚洲乱码国产乱码精品精可以看| 成人欧美一区二区三区在线播放| 亚洲欧美怡红院| 亚洲国产另类av| 国内精品国产成人国产三级粉色 | 美女一区二区三区| 国产成人aaa| 在线观看视频欧美| 欧美一区二区精品久久911| 久久日韩精品一区二区五区| 国产精品初高中害羞小美女文| 一区二区三区精品久久久| 婷婷综合在线观看| 国产精品自在在线| 色综合天天综合色综合av| 欧美日韩国产经典色站一区二区三区 | 日本aⅴ亚洲精品中文乱码| 美女免费视频一区| www.一区二区| 正在播放亚洲一区| 国产性做久久久久久| 亚洲综合成人在线| 久久成人羞羞网站| 成人午夜电影久久影院| 欧美日韩国产在线观看| 久久婷婷综合激情| 亚洲高清视频中文字幕| 国产不卡视频一区| 欧美高清视频在线高清观看mv色露露十八 | 中文字幕中文在线不卡住| 午夜精品一区二区三区三上悠亚| 国产精品综合一区二区三区| 欧洲生活片亚洲生活在线观看| 精品国精品自拍自在线| 一区二区三区精密机械公司| 国产精品综合av一区二区国产馆| 欧美日韩你懂的| 国产精品狼人久久影院观看方式| 免费精品99久久国产综合精品| 91麻豆国产香蕉久久精品| 久久综合久久鬼色中文字| 亚洲一区二区三区在线播放| 顶级嫩模精品视频在线看| 日韩一区二区在线播放| 亚洲国产一区二区a毛片| 国产69精品一区二区亚洲孕妇| 欧美一区二区三区日韩视频| 亚洲激情在线播放| av中文一区二区三区| 欧美精品一区二区三| 日韩激情视频在线观看| 91官网在线免费观看| 成人免费视频在线观看| 国产成人精品免费一区二区| 精品福利一区二区三区免费视频| 一区二区三区 在线观看视频| 成人午夜av电影| 久久久久久一二三区| 精品一区二区综合| 日韩视频免费观看高清完整版 | 成人欧美一区二区三区视频网页| 国产成人免费av在线| 久久蜜桃一区二区| 国产精品一区二区三区网站| 精品国产亚洲在线| 国产在线观看一区二区| 精品嫩草影院久久| 国产在线播放一区| 精品国产成人在线影院| 六月丁香婷婷色狠狠久久| 欧美一级艳片视频免费观看| 日韩avvvv在线播放| 日韩一级二级三级精品视频| 三级在线观看一区二区| 91麻豆精品国产91久久久 |