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

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

?? deflate.java

?? java 版本的zlib壓縮代碼
?? JAVA
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
/* -*-mode:java; c-basic-offset:2; -*- *//*Copyright (c) 2000,2001,2002,2003 ymnk, JCraft,Inc. All rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice,     this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright      notice, this list of conditions and the following disclaimer in      the documentation and/or other materials provided with the distribution.  3. The names of the authors may not be used to endorse or promote products     derived from this software without specific prior written permission.THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDINGNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *//* * This program is based on zlib-1.1.3, so all credit should go authors * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) * and contributors of zlib. */package com.jcraft.jzlib;public final class Deflate{  static final private int MAX_MEM_LEVEL=9;  static final private int Z_DEFAULT_COMPRESSION=-1;  static final private int MAX_WBITS=15;            // 32K LZ77 window  static final private int DEF_MEM_LEVEL=8;  static class Config{    int good_length; // reduce lazy search above this match length    int max_lazy;    // do not perform lazy search above this match length    int nice_length; // quit search above this match length    int max_chain;    int func;    Config(int good_length, int max_lazy, 	   int nice_length, int max_chain, int func){      this.good_length=good_length;      this.max_lazy=max_lazy;      this.nice_length=nice_length;      this.max_chain=max_chain;      this.func=func;    }  }    static final private int STORED=0;  static final private int FAST=1;  static final private int SLOW=2;  static final private Config[] config_table;      static{    config_table=new Config[10];    //                         good  lazy  nice  chain    config_table[0]=new Config(0,    0,    0,    0, STORED);    config_table[1]=new Config(4,    4,    8,    4, FAST);    config_table[2]=new Config(4,    5,   16,    8, FAST);    config_table[3]=new Config(4,    6,   32,   32, FAST);    config_table[4]=new Config(4,    4,   16,   16, SLOW);    config_table[5]=new Config(8,   16,   32,   32, SLOW);    config_table[6]=new Config(8,   16,  128,  128, SLOW);    config_table[7]=new Config(8,   32,  128,  256, SLOW);    config_table[8]=new Config(32, 128,  258, 1024, SLOW);    config_table[9]=new Config(32, 258,  258, 4096, SLOW);  }  static final private String[] z_errmsg = {    "need dictionary",     // Z_NEED_DICT       2    "stream end",          // Z_STREAM_END      1    "",                    // Z_OK              0    "file error",          // Z_ERRNO         (-1)    "stream error",        // Z_STREAM_ERROR  (-2)    "data error",          // Z_DATA_ERROR    (-3)    "insufficient memory", // Z_MEM_ERROR     (-4)    "buffer error",        // Z_BUF_ERROR     (-5)    "incompatible version",// Z_VERSION_ERROR (-6)    ""  };  // block not completed, need more input or more output  static final private int NeedMore=0;   // block flush performed  static final private int BlockDone=1;   // finish started, need only more output at next deflate  static final private int FinishStarted=2;  // finish done, accept no more input or output  static final private int FinishDone=3;  // preset dictionary flag in zlib header  static final private int PRESET_DICT=0x20;  static final private int Z_FILTERED=1;  static final private int Z_HUFFMAN_ONLY=2;  static final private int Z_DEFAULT_STRATEGY=0;  static final private int Z_NO_FLUSH=0;  static final private int Z_PARTIAL_FLUSH=1;  static final private int Z_SYNC_FLUSH=2;  static final private int Z_FULL_FLUSH=3;  static final private int Z_FINISH=4;  static final private int Z_OK=0;  static final private int Z_STREAM_END=1;  static final private int Z_NEED_DICT=2;  static final private int Z_ERRNO=-1;  static final private int Z_STREAM_ERROR=-2;  static final private int Z_DATA_ERROR=-3;  static final private int Z_MEM_ERROR=-4;  static final private int Z_BUF_ERROR=-5;  static final private int Z_VERSION_ERROR=-6;  static final private int INIT_STATE=42;  static final private int BUSY_STATE=113;  static final private int FINISH_STATE=666;  // The deflate compression method  static final private int Z_DEFLATED=8;  static final private int STORED_BLOCK=0;  static final private int STATIC_TREES=1;  static final private int DYN_TREES=2;  // The three kinds of block type  static final private int Z_BINARY=0;  static final private int Z_ASCII=1;  static final private int Z_UNKNOWN=2;  static final private int Buf_size=8*2;  // repeat previous bit length 3-6 times (2 bits of repeat count)  static final private int REP_3_6=16;   // repeat a zero length 3-10 times  (3 bits of repeat count)  static final private int REPZ_3_10=17;   // repeat a zero length 11-138 times  (7 bits of repeat count)  static final private int REPZ_11_138=18;   static final private int MIN_MATCH=3;  static final private int MAX_MATCH=258;  static final private int MIN_LOOKAHEAD=(MAX_MATCH+MIN_MATCH+1);  static final private int MAX_BITS=15;  static final private int D_CODES=30;  static final private int BL_CODES=19;  static final private int LENGTH_CODES=29;  static final private int LITERALS=256;  static final private int L_CODES=(LITERALS+1+LENGTH_CODES);  static final private int HEAP_SIZE=(2*L_CODES+1);  static final private int END_BLOCK=256;  ZStream strm;         // pointer back to this zlib stream  int status;           // as the name implies  byte[] pending_buf;   // output still pending  int pending_buf_size; // size of pending_buf  int pending_out;      // next pending byte to output to the stream  int pending;          // nb of bytes in the pending buffer  int noheader;         // suppress zlib header and adler32  byte data_type;       // UNKNOWN, BINARY or ASCII  byte method;          // STORED (for zip only) or DEFLATED  int last_flush;       // value of flush param for previous deflate call  int w_size;           // LZ77 window size (32K by default)  int w_bits;           // log2(w_size)  (8..16)  int w_mask;           // w_size - 1  byte[] window;  // Sliding window. Input bytes are read into the second half of the window,  // and move to the first half later to keep a dictionary of at least wSize  // bytes. With this organization, matches are limited to a distance of  // wSize-MAX_MATCH bytes, but this ensures that IO is always  // performed with a length multiple of the block size. Also, it limits  // the window size to 64K, which is quite useful on MSDOS.  // To do: use the user input buffer as sliding window.  int window_size;  // Actual size of window: 2*wSize, except when the user input buffer  // is directly used as sliding window.  short[] prev;  // Link to older string with same hash index. To limit the size of this  // array to 64K, this link is maintained only for the last 32K strings.  // An index in this array is thus a window index modulo 32K.  short[] head; // Heads of the hash chains or NIL.  int ins_h;          // hash index of string to be inserted  int hash_size;      // number of elements in hash table  int hash_bits;      // log2(hash_size)  int hash_mask;      // hash_size-1  // Number of bits by which ins_h must be shifted at each input  // step. It must be such that after MIN_MATCH steps, the oldest  // byte no longer takes part in the hash key, that is:  // hash_shift * MIN_MATCH >= hash_bits  int hash_shift;  // Window position at the beginning of the current output block. Gets  // negative when the window is moved backwards.  int block_start;  int match_length;           // length of best match  int prev_match;             // previous match  int match_available;        // set if previous match exists  int strstart;               // start of string to insert  int match_start;            // start of matching string  int lookahead;              // number of valid bytes ahead in window  // Length of the best match at previous step. Matches not greater than this  // are discarded. This is used in the lazy match evaluation.  int prev_length;  // To speed up deflation, hash chains are never searched beyond this  // length.  A higher limit improves compression ratio but degrades the speed.  int max_chain_length;  // Attempt to find a better match only when the current match is strictly  // smaller than this value. This mechanism is used only for compression  // levels >= 4.  int max_lazy_match;  // Insert new strings in the hash table only if the match length is not  // greater than this length. This saves time but degrades compression.  // max_insert_length is used only for compression levels <= 3.  int level;    // compression level (1..9)  int strategy; // favor or force Huffman coding  // Use a faster search when the previous match is longer than this  int good_match;  // Stop searching when current match exceeds this  int nice_match;  short[] dyn_ltree;       // literal and length tree  short[] dyn_dtree;       // distance tree  short[] bl_tree;         // Huffman tree for bit lengths  Tree l_desc=new Tree();  // desc for literal tree  Tree d_desc=new Tree();  // desc for distance tree  Tree bl_desc=new Tree(); // desc for bit length tree  // number of codes at each bit length for an optimal tree  short[] bl_count=new short[MAX_BITS+1];  // heap used to build the Huffman trees  int[] heap=new int[2*L_CODES+1];  int heap_len;               // number of elements in the heap  int heap_max;               // element of largest frequency  // The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.  // The same heap array is used to build all trees.  // Depth of each subtree used as tie breaker for trees of equal frequency  byte[] depth=new byte[2*L_CODES+1];  int l_buf;               // index for literals or lengths */  // Size of match buffer for literals/lengths.  There are 4 reasons for  // limiting lit_bufsize to 64K:  //   - frequencies can be kept in 16 bit counters  //   - if compression is not successful for the first block, all input  //     data is still in the window so we can still emit a stored block even  //     when input comes from standard input.  (This can also be done for  //     all blocks if lit_bufsize is not greater than 32K.)  //   - if compression is not successful for a file smaller than 64K, we can  //     even emit a stored file instead of a stored block (saving 5 bytes).  //     This is applicable only for zip (not gzip or zlib).  //   - creating new Huffman trees less frequently may not provide fast  //     adaptation to changes in the input data statistics. (Take for  //     example a binary file with poorly compressible code followed by  //     a highly compressible string table.) Smaller buffer sizes give  //     fast adaptation but have of course the overhead of transmitting  //     trees more frequently.  //   - I can't count above 4  int lit_bufsize;  int last_lit;      // running index in l_buf  // Buffer for distances. To simplify the code, d_buf and l_buf have  // the same number of elements. To use different lengths, an extra flag  // array would be necessary.  int d_buf;         // index of pendig_buf  int opt_len;        // bit length of current block with optimal trees  int static_len;     // bit length of current block with static trees  int matches;        // number of string matches in current block  int last_eob_len;   // bit length of EOB code for last block  // Output buffer. bits are inserted starting at the bottom (least  // significant bits).  short bi_buf;  // Number of valid bits in bi_buf.  All bits above the last valid bit  // are always zero.  int bi_valid;  Deflate(){    dyn_ltree=new short[HEAP_SIZE*2];    dyn_dtree=new short[(2*D_CODES+1)*2]; // distance tree    bl_tree=new short[(2*BL_CODES+1)*2];  // Huffman tree for bit lengths  }  void lm_init() {    window_size=2*w_size;    head[hash_size-1]=0;    for(int i=0; i<hash_size-1; i++){      head[i]=0;    }    // Set the default configuration parameters:    max_lazy_match   = Deflate.config_table[level].max_lazy;    good_match       = Deflate.config_table[level].good_length;    nice_match       = Deflate.config_table[level].nice_length;    max_chain_length = Deflate.config_table[level].max_chain;    strstart = 0;    block_start = 0;    lookahead = 0;    match_length = prev_length = MIN_MATCH-1;    match_available = 0;    ins_h = 0;  }  // Initialize the tree data structures for a new zlib stream.  void tr_init(){    l_desc.dyn_tree = dyn_ltree;    l_desc.stat_desc = StaticTree.static_l_desc;    d_desc.dyn_tree = dyn_dtree;    d_desc.stat_desc = StaticTree.static_d_desc;    bl_desc.dyn_tree = bl_tree;    bl_desc.stat_desc = StaticTree.static_bl_desc;    bi_buf = 0;    bi_valid = 0;    last_eob_len = 8; // enough lookahead for inflate    // Initialize the first block of the first file:    init_block();  }  void init_block(){    // Initialize the trees.    for(int i = 0; i < L_CODES; i++) dyn_ltree[i*2] = 0;    for(int i= 0; i < D_CODES; i++) dyn_dtree[i*2] = 0;    for(int i= 0; i < BL_CODES; i++) bl_tree[i*2] = 0;    dyn_ltree[END_BLOCK*2] = 1;    opt_len = static_len = 0;    last_lit = matches = 0;  }  // Restore the heap property by moving down the tree starting at node k,  // exchanging a node with the smallest of its two sons if necessary, stopping  // when the heap property is re-established (each father smaller than its  // two sons).  void pqdownheap(short[] tree,  // the tree to restore		  int k          // node to move down		  ){    int v = heap[k];    int j = k << 1;  // left son of k    while (j <= heap_len) {      // Set j to the smallest of the two sons:      if (j < heap_len &&	  smaller(tree, heap[j+1], heap[j], depth)){	j++;      }      // Exit if v is smaller than both sons      if(smaller(tree, v, heap[j], depth)) break;      // Exchange v with the smallest son      heap[k]=heap[j];  k = j;      // And continue down the tree, setting j to the left son of k      j <<= 1;    }    heap[k] = v;  }  static boolean smaller(short[] tree, int n, int m, byte[] depth){    short tn2=tree[n*2];

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩激情一区二区| 欧美日韩精品一区二区三区四区| 久久草av在线| 日本不卡视频在线| 蜜臀av性久久久久蜜臀aⅴ | 日本一区二区高清| 久久噜噜亚洲综合| 2020国产精品| 久久久夜色精品亚洲| 国产欧美日韩中文久久| 中文在线一区二区| 国产精品嫩草影院com| 亚洲欧洲国产日本综合| 亚洲激情在线激情| 亚洲成国产人片在线观看| 午夜私人影院久久久久| 午夜精彩视频在线观看不卡| 日本伊人色综合网| 国产精品一区二区视频| www.爱久久.com| 91国偷自产一区二区三区成为亚洲经典| 色香蕉成人二区免费| 欧美午夜一区二区三区| 日韩一区二区三区免费看 | 91精品午夜视频| 精品国产一区二区三区忘忧草| 久久麻豆一区二区| 亚洲色图制服诱惑| 视频一区在线播放| 国产伦精品一区二区三区在线观看| 丁香桃色午夜亚洲一区二区三区| gogo大胆日本视频一区| 欧美日本免费一区二区三区| 精品国偷自产国产一区| 一区免费观看视频| 日韩电影在线一区二区三区| 国产乱子伦一区二区三区国色天香| k8久久久一区二区三区| 欧美日韩一区在线观看| 久久日一线二线三线suv| 国产精品久久久久影院亚瑟| 亚洲va欧美va人人爽| 国产精品1区二区.| 日本二三区不卡| 精品免费国产二区三区 | 狠狠色丁香婷婷综合久久片| 99免费精品视频| 8x福利精品第一导航| 欧美国产精品专区| 视频一区二区三区在线| 成人精品gif动图一区| 在线不卡一区二区| 中文字幕不卡在线播放| 日本不卡一区二区| 色哟哟日韩精品| 精品国产凹凸成av人网站| 亚洲乱码中文字幕| 国产精品综合av一区二区国产馆| 在线观看中文字幕不卡| 国产亚洲欧美一区在线观看| 视频一区二区国产| 一本到三区不卡视频| 久久人人爽爽爽人久久久| 亚洲高清在线视频| 国产成人高清视频| 日韩欧美不卡在线观看视频| 中文字幕综合网| 国产传媒欧美日韩成人| 91.com视频| 亚洲精品少妇30p| 国产风韵犹存在线视精品| 日韩无一区二区| 一区二区三区在线观看动漫| 成人av在线播放网址| 精品对白一区国产伦| 天天亚洲美女在线视频| 色悠悠亚洲一区二区| 亚洲国产精品传媒在线观看| 久久99国产精品久久| 欧美丰满嫩嫩电影| 一区二区三区在线观看网站| 成人午夜电影小说| 国产婷婷色一区二区三区四区| 秋霞av亚洲一区二区三| 欧美日韩一区国产| 夜夜精品视频一区二区 | 欧美日韩小视频| 亚洲免费观看视频| 成人午夜av电影| 国产婷婷色一区二区三区在线| 精品一区二区精品| 欧美第一区第二区| 美女一区二区久久| 欧美一区二区三区日韩| 天天影视色香欲综合网老头| 欧美区在线观看| 午夜精品福利久久久| 欧美日本在线一区| 日本一区中文字幕| 91麻豆精品国产自产在线观看一区 | 国产精品久久三| 成人精品国产一区二区4080| 国产精品嫩草影院av蜜臀| 成人福利视频在线看| 国产精品入口麻豆原神| 成人动漫一区二区| **性色生活片久久毛片| 91丨九色丨黑人外教| 亚洲精品日产精品乱码不卡| 在线免费一区三区| 亚洲福利视频一区| 欧美一级片免费看| 国产精品一二三四| 国产精品久久久久久久久免费相片 | 视频一区二区三区中文字幕| 777久久久精品| 国内精品免费**视频| 国产清纯美女被跳蛋高潮一区二区久久w| 国产一区二区美女诱惑| 欧美国产日韩精品免费观看| 91一区二区三区在线播放| 一区二区成人在线| 91精品国产综合久久久久久 | 欧美午夜在线一二页| 日韩黄色小视频| 久久这里只有精品6| 不卡的av电影在线观看| 一区二区成人在线观看| 日韩亚洲欧美中文三级| 国产99久久久国产精品| 亚洲一区二区精品视频| 日韩精品中文字幕一区| 成人免费毛片片v| 亚洲国产视频直播| 精品久久人人做人人爽| 成人国产精品免费观看视频| 亚洲成人黄色影院| 国产区在线观看成人精品| 欧美影视一区二区三区| 国模套图日韩精品一区二区 | 日本美女一区二区三区视频| 久久久九九九九| 91国产视频在线观看| 美女视频黄免费的久久| 国产精品理论片在线观看| 欧美精品三级日韩久久| 国产精品一级片| 亚洲国产日韩精品| 国产女主播视频一区二区| 在线观看成人小视频| 国产一区二区三区| 亚洲成人av一区二区| 国产婷婷色一区二区三区四区 | 中日韩免费视频中文字幕| 欧美色倩网站大全免费| 国产成人精品亚洲日本在线桃色| 一区二区三国产精华液| 国产亚洲欧美在线| 欧美精品xxxxbbbb| 成人动漫中文字幕| 另类中文字幕网| 亚洲黄色在线视频| 国产欧美日韩在线观看| 欧美一区二区三区爱爱| 91麻豆国产在线观看| 黑人精品欧美一区二区蜜桃| 亚洲一区中文日韩| 国产精品人人做人人爽人人添| 91精品国产色综合久久久蜜香臀| 91色porny在线视频| 国模套图日韩精品一区二区| 午夜欧美在线一二页| 亚洲视频 欧洲视频| 国产日韩欧美精品一区| 日韩视频一区二区在线观看| 欧美三级在线播放| 91蜜桃免费观看视频| 国产成人午夜99999| 蜜桃av噜噜一区二区三区小说| 亚洲精品成人悠悠色影视| 中文字幕第一区| 久久综合一区二区| 欧美大片在线观看一区二区| 欧美色精品在线视频| 91免费观看视频在线| 成人动漫视频在线| 国产成人综合亚洲网站| 经典三级一区二区| 日本亚洲视频在线| 日韩激情视频网站| 天天操天天色综合| 亚洲电影在线播放| 亚洲综合丝袜美腿| 一区二区久久久| 亚洲免费高清视频在线| 18成人在线观看| 国产精品你懂的| 日韩美女久久久| 亚洲精品五月天| 亚洲国产精品一区二区www|