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

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

?? infblock.c

?? mp3 source code decoder & encoder
?? C
字號(hào):
/* infblock.c -- interpret and process block types to last block
 * Copyright (C) 1995-1996 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 */

/* Table for deflate from PKZIP's appnote.txt. */
local 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(inflate_blocks_statef *s, z_streamp z,uLongf * c)
{
  if (s->checkfn != 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);
    inflate_trees_free(s->sub.decode.td, z);
    inflate_trees_free(s->sub.decode.tl, 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, Z_NULL, 0);
  Trace((stderr, "inflate:   blocks reset\n"));
}


inflate_blocks_statef *inflate_blocks_new(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->window = (Bytef *)ZALLOC(z, 1, w)) == Z_NULL)
  {
    ZFREE(z, s);
    return Z_NULL;
  }
  s->end = s->window + w;
  s->checkfn = c;
  s->mode = TYPE;
  Trace((stderr, "inflate:   blocks allocated\n"));
  inflate_blocks_reset(s, z, &s->check);
  return s;
}


#ifdef DEBUG
  extern uInt inflate_hufts;
#endif
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 */
          Trace((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 */
          Trace((stderr, "inflate:     fixed codes block%s\n",
                 s->last ? " (last)" : ""));
          {
            uInt bl, bd;
            inflate_huft *tl, *td;

            inflate_trees_fixed(&bl, &bd, &tl, &td);
            s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
            if (s->sub.decode.codes == Z_NULL)
            {
              r = Z_MEM_ERROR;
              LEAVE
            }
            s->sub.decode.tl = Z_NULL;  /* don't try to free these */
            s->sub.decode.td = Z_NULL;
          }
          DUMPBITS(3)
          s->mode = CODES;
          break;
        case 2:                         /* dynamic */
          Trace((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 (t < 19)
        t = 19;
      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, z);
      if (t != Z_OK)
      {
        r = t;
        if (r == Z_DATA_ERROR)
          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->word.what.Bits;
        c = h->more.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))
          {
            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;
        }
      }
      inflate_trees_free(s->sub.trees.tb, z);
      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;
#ifdef DEBUG
      inflate_hufts = 0;
#endif
        t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
                                  s->sub.trees.blens, &bl, &bd, &tl, &td, z);
        if (t != Z_OK)
        {
          if (t == (uInt)Z_DATA_ERROR)
            s->mode = BAD;
          r = t;
          LEAVE
        }
        Tracev((stderr, "inflate:       trees ok, %d * %d bytes used\n",
              inflate_hufts, sizeof(inflate_huft)));
        if ((c = inflate_codes_new(bl, bd, tl, td, z)) == Z_NULL)
        {
          inflate_trees_free(td, z);
          inflate_trees_free(tl, z);
          r = Z_MEM_ERROR;
          LEAVE
        }
        ZFREE(z, s->sub.trees.blens);
        s->sub.decode.codes = c;
        s->sub.decode.tl = tl;
        s->sub.decode.td = td;
      }
      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);
      inflate_trees_free(s->sub.decode.td, z);
      inflate_trees_free(s->sub.decode.tl, 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;
      }
      if (k > 7)              /* return unused byte, if any */
      {
        Assert(k < 16, "inflate_codes grabbed too many bytes")
        k -= 8;
        n++;
        p--;                    /* can always return one */
      }
      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(inflate_blocks_statef *s, z_streamp z, uLongf *c)
{
  inflate_blocks_reset(s, z, c);
  ZFREE(z, s->window);
  ZFREE(z, s);
  Trace((stderr, "inflate:   blocks freed\n"));
  return Z_OK;
}


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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色欧美88888久久久久久影院| 国产欧美一区二区精品性色| 日韩精品一区二区在线观看| 国产午夜精品久久| 亚洲免费观看高清完整版在线 | 亚洲成年人影院| 精品在线一区二区三区| 99久久久国产精品| 日韩一区二区在线观看| 国产精品污www在线观看| 一区二区三区四区在线播放 | 成人免费观看av| 欧美日韩国产bt| 国产精品精品国产色婷婷| 琪琪久久久久日韩精品| av亚洲精华国产精华精| 日韩一级完整毛片| 亚洲一区二区视频在线观看| 国产一区二区精品久久99| 在线观看免费成人| 国产精品成人免费| 国产精品亚洲人在线观看| 欧美日韩国产乱码电影| 亚洲丝袜精品丝袜在线| 激情小说亚洲一区| 色av一区二区| 亚洲欧美在线高清| 成人高清视频在线| 国产日韩欧美电影| 国产在线视频不卡二| 欧美mv日韩mv国产网站app| 爽好多水快深点欧美视频| 91久久精品一区二区三区| 亚洲男人的天堂在线aⅴ视频| 99国产欧美久久久精品| 日韩一区二区精品| 久久9热精品视频| 精品国产乱子伦一区| 麻豆视频观看网址久久| 日韩欧美国产wwwww| 精品亚洲国内自在自线福利| 欧美大片在线观看| 激情成人午夜视频| 久久久www成人免费无遮挡大片| 国产一区二区三区视频在线播放| 精品精品国产高清a毛片牛牛 | 欧美无人高清视频在线观看| 亚洲视频一二三| 欧美老肥妇做.爰bbww视频| 丝袜a∨在线一区二区三区不卡| 欧美精品乱人伦久久久久久| 奇米一区二区三区| 欧美国产禁国产网站cc| 99精品偷自拍| 日韩精品一级二级 | 亚洲一二三级电影| 91丨porny丨在线| 天堂影院一区二区| 久久久国产午夜精品| 色综合天天综合狠狠| 五月婷婷综合激情| 亚洲国产电影在线观看| 欧美专区日韩专区| 国产综合色产在线精品| 青娱乐精品视频| 久久久久亚洲蜜桃| 精品视频色一区| 国产精品一区在线观看你懂的| 亚洲欧洲成人自拍| 在线亚洲欧美专区二区| 国产a视频精品免费观看| 一区二区三区精品视频在线| 久久精品视频在线免费观看| 欧美三级在线视频| 99re在线精品| 久久99这里只有精品| 亚洲成人精品在线观看| 中文文精品字幕一区二区| 91精品视频网| 日本高清不卡aⅴ免费网站| 成人午夜视频福利| 久久成人羞羞网站| 麻豆精品一区二区综合av| 亚洲综合激情小说| 亚洲激情av在线| 亚洲人成人一区二区在线观看 | 欧美mv日韩mv国产网站app| 欧美日韩五月天| 欧美网站大全在线观看| 93久久精品日日躁夜夜躁欧美| 成人午夜视频网站| 粉嫩久久99精品久久久久久夜| 国产一区二区三区av电影| 国产一区在线观看视频| 国产一区美女在线| 风间由美一区二区三区在线观看| 国产一区二区成人久久免费影院| 久久 天天综合| 成人小视频在线| www.日韩av| 欧美亚洲综合在线| 日韩一级欧美一级| 精品黑人一区二区三区久久| 久久嫩草精品久久久精品| 日本一区二区三区国色天香 | 黑人巨大精品欧美黑白配亚洲| 精品一区二区三区影院在线午夜| 精品一区二区三区免费视频| 国产精品一区在线观看你懂的| 国产91对白在线观看九色| 91丝袜呻吟高潮美腿白嫩在线观看| 91亚洲永久精品| 日韩一级片在线播放| 国产精品美女久久久久av爽李琼| 一区二区三区成人在线视频| 日本美女视频一区二区| 国产·精品毛片| 欧美日韩成人一区二区| 26uuu国产电影一区二区| 亚洲精品高清视频在线观看| 久久se精品一区精品二区| 99在线精品免费| 精品国产123| 亚洲综合色视频| 成人精品免费视频| 欧美一级艳片视频免费观看| 国产精品久久久久久久岛一牛影视| 午夜精品爽啪视频| 成人av先锋影音| 欧美刺激午夜性久久久久久久| 亚洲人成人一区二区在线观看| 另类人妖一区二区av| 在线免费观看日韩欧美| 性欧美疯狂xxxxbbbb| 成人激情视频网站| 久久伊人中文字幕| 日本不卡一二三| 欧美欧美欧美欧美首页| 自拍偷在线精品自拍偷无码专区| 国产麻豆视频精品| 欧美大片在线观看一区二区| 午夜精品国产更新| 欧美日韩一区三区四区| 国产精品福利一区二区| 99热在这里有精品免费| 国产日韩欧美亚洲| 国产91对白在线观看九色| 日本一区二区免费在线观看视频 | 91丝袜国产在线播放| 亚洲婷婷在线视频| 色94色欧美sute亚洲13| 一区二区成人在线视频| 欧美精品丝袜中出| 美女www一区二区| 久久综合九色综合97婷婷| 国产一区在线不卡| 中文字幕在线不卡视频| 欧美性三三影院| 免费观看在线综合| 久久精品一区四区| 91福利精品第一导航| 日韩和欧美的一区| 亚洲国产高清aⅴ视频| 色伊人久久综合中文字幕| 亚洲乱码国产乱码精品精小说| 欧美日本一区二区三区四区| 久久97超碰色| 亚洲视频一区二区在线| 欧美一区二区三区精品| 成人av网站在线观看免费| 一区二区三区av电影 | 粗大黑人巨茎大战欧美成人| 亚洲伦理在线精品| 久久精品一区二区三区四区| 91在线免费看| 国产毛片一区二区| 亚洲综合在线电影| 国产日韩欧美麻豆| 欧美电影一区二区| 91亚洲精品久久久蜜桃网站 | 久久精品欧美一区二区三区麻豆| 色狠狠综合天天综合综合| 国产一区二区在线影院| 一级日本不卡的影视| 日本一区二区高清| 精品国产乱码久久| 欧美一二三四区在线| 色嗨嗨av一区二区三区| 成人精品亚洲人成在线| 精品一区二区三区在线播放 | 美国精品在线观看| 午夜精品在线看| 亚洲国产综合色| 一区二区三区中文字幕电影 | 精品一区二区久久| 婷婷六月综合亚洲| 日韩精品视频网| 午夜成人免费电影| 舔着乳尖日韩一区| 日韩不卡在线观看日韩不卡视频|