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

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

?? deflate.c

?? p2p技術C源代碼.rar
?? C
?? 第 1 頁 / 共 4 頁
字號:

    strm->total_in = strm->total_out = 0;
    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
    strm->data_type = Z_UNKNOWN;

    s = (deflate_state *)strm->state;
    s->pending = 0;
    s->pending_out = s->pending_buf;

    if (s->noheader < 0) {
        s->noheader = 0; /* was set to -1 by deflate(..., Z_FINISH); */
    }
    s->status = s->noheader ? BUSY_STATE : INIT_STATE;
    strm->adler = 1;
    s->last_flush = Z_NO_FLUSH;

    _tr_init(s);
    lm_init(s);

    return Z_OK;
}

/* ========================================================================= */
int ZEXPORT deflateParams(strm, level, strategy)
    z_streamp strm;
    int level;
    int strategy;
{
    deflate_state *s;
    compress_func func;
    int err = Z_OK;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    s = strm->state;

    if (level == Z_DEFAULT_COMPRESSION) {
	level = 6;
    }
    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
	return Z_STREAM_ERROR;
    }
    func = configuration_table[s->level].func;

    if (func != configuration_table[level].func && strm->total_in != 0) {
	/* Flush the last buffer: */
	err = deflate(strm, Z_PARTIAL_FLUSH);
    }
    if (s->level != level) {
	s->level = level;
	s->max_lazy_match   = configuration_table[level].max_lazy;
	s->good_match       = configuration_table[level].good_length;
	s->nice_match       = configuration_table[level].nice_length;
	s->max_chain_length = configuration_table[level].max_chain;
    }
    s->strategy = strategy;
    return err;
}

/* =========================================================================
 * Put a short in the pending buffer. The 16-bit value is put in MSB order.
 * IN assertion: the stream state is correct and there is enough room in
 * pending_buf.
 */
local void putShortMSB (s, b)
    deflate_state *s;
    uInt b;
{
    put_byte(s, (Byte)(b >> 8));
    put_byte(s, (Byte)(b & 0xff));
}   

/* =========================================================================
 * Flush as much pending output as possible. All deflate() output goes
 * through this function so some applications may wish to modify it
 * to avoid allocating a large strm->next_out buffer and copying into it.
 * (See also read_buf()).
 */
local void flush_pending(strm)
    z_streamp strm;
{
    unsigned len = strm->state->pending;

    if (len > strm->avail_out) len = strm->avail_out;
    if (len == 0) return;

    zmemcpy(strm->next_out, strm->state->pending_out, len);
    strm->next_out  += len;
    strm->state->pending_out  += len;
    strm->total_out += len;
    strm->avail_out  -= len;
    strm->state->pending -= len;
    if (strm->state->pending == 0) {
        strm->state->pending_out = strm->state->pending_buf;
    }
}

/* ========================================================================= */
int ZEXPORT deflate (strm, flush)
    z_streamp strm;
    int flush;
{
    int old_flush; /* value of flush param for previous deflate call */
    deflate_state *s;

    if (strm == Z_NULL || strm->state == Z_NULL ||
	flush > Z_FINISH || flush < 0) {
        return Z_STREAM_ERROR;
    }
    s = strm->state;

    if (strm->next_out == Z_NULL ||
        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
	(s->status == FINISH_STATE && flush != Z_FINISH)) {
        ERR_RETURN(strm, Z_STREAM_ERROR);
    }
    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);

    s->strm = strm; /* just in case */
    old_flush = s->last_flush;
    s->last_flush = flush;

    /* Write the zlib header */
    if (s->status == INIT_STATE) {

        uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
        uInt level_flags = (s->level-1) >> 1;

        if (level_flags > 3) level_flags = 3;
        header |= (level_flags << 6);
	if (s->strstart != 0) header |= PRESET_DICT;
        header += 31 - (header % 31);

        s->status = BUSY_STATE;
        putShortMSB(s, header);

	/* Save the adler32 of the preset dictionary: */
	if (s->strstart != 0) {
	    putShortMSB(s, (uInt)(strm->adler >> 16));
	    putShortMSB(s, (uInt)(strm->adler & 0xffff));
	}
	strm->adler = 1L;
    }

    /* Flush as much pending output as possible */
    if (s->pending != 0) {
        flush_pending(strm);
        if (strm->avail_out == 0) {
	    /* Since avail_out is 0, deflate will be called again with
	     * more output space, but possibly with both pending and
	     * avail_in equal to zero. There won't be anything to do,
	     * but this is not an error situation so make sure we
	     * return OK instead of BUF_ERROR at next call of deflate:
             */
	    s->last_flush = -1;
	    return Z_OK;
	}

    /* Make sure there is something to do and avoid duplicate consecutive
     * flushes. For repeated and useless calls with Z_FINISH, we keep
     * returning Z_STREAM_END instead of Z_BUFF_ERROR.
     */
    } else if (strm->avail_in == 0 && flush <= old_flush &&
	       flush != Z_FINISH) {
        ERR_RETURN(strm, Z_BUF_ERROR);
    }

    /* User must not provide more input after the first FINISH: */
    if (s->status == FINISH_STATE && strm->avail_in != 0) {
        ERR_RETURN(strm, Z_BUF_ERROR);
    }

    /* Start a new block or continue the current one.
     */
    if (strm->avail_in != 0 || s->lookahead != 0 ||
        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
        block_state bstate;

	bstate = (*(configuration_table[s->level].func))(s, flush);

        if (bstate == finish_started || bstate == finish_done) {
            s->status = FINISH_STATE;
        }
        if (bstate == need_more || bstate == finish_started) {
	    if (strm->avail_out == 0) {
	        s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
	    }
	    return Z_OK;
	    /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
	     * of deflate should use the same flush parameter to make sure
	     * that the flush is complete. So we don't have to output an
	     * empty block here, this will be done at next call. This also
	     * ensures that for a very small output buffer, we emit at most
	     * one empty block.
	     */
	}
        if (bstate == block_done) {
            if (flush == Z_PARTIAL_FLUSH) {
                _tr_align(s);
            } else { /* FULL_FLUSH or SYNC_FLUSH */
                _tr_stored_block(s, (char*)0, 0L, 0);
                /* For a full flush, this empty block will be recognized
                 * as a special marker by inflate_sync().
                 */
                if (flush == Z_FULL_FLUSH) {
                    CLEAR_HASH(s);             /* forget history */
                }
            }
            flush_pending(strm);
	    if (strm->avail_out == 0) {
	      s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
	      return Z_OK;
	    }
        }
    }
    Assert(strm->avail_out > 0, "bug2");

    if (flush != Z_FINISH) return Z_OK;
    if (s->noheader) return Z_STREAM_END;

    /* Write the zlib trailer (adler32) */
    putShortMSB(s, (uInt)(strm->adler >> 16));
    putShortMSB(s, (uInt)(strm->adler & 0xffff));
    flush_pending(strm);
    /* If avail_out is zero, the application will call deflate again
     * to flush the rest.
     */
    s->noheader = -1; /* write the trailer only once! */
    return s->pending != 0 ? Z_OK : Z_STREAM_END;
}

/* ========================================================================= */
int ZEXPORT deflateEnd (strm)
    z_streamp strm;
{
    int status;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;

    status = strm->state->status;
    if (status != INIT_STATE && status != BUSY_STATE &&
	status != FINISH_STATE) {
      return Z_STREAM_ERROR;
    }

    /* Deallocate in reverse order of allocations: */
    TRY_FREE(strm, strm->state->pending_buf);
    TRY_FREE(strm, strm->state->head);
    TRY_FREE(strm, strm->state->prev);
    TRY_FREE(strm, strm->state->window);

    ZFREE(strm, strm->state);
    strm->state = Z_NULL;

    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
}

/* =========================================================================
 * Copy the source state to the destination state.
 * To simplify the source, this is not supported for 16-bit MSDOS (which
 * doesn't have enough memory anyway to duplicate compression states).
 */
int ZEXPORT deflateCopy (dest, source)
    z_streamp dest;
    z_streamp source;
{
#ifdef MAXSEG_64K
    return Z_STREAM_ERROR;
#else
    deflate_state *ds;
    deflate_state *ss;
    ushf *overlay;


    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
        return Z_STREAM_ERROR;
    }

    ss = source->state;

    *dest = *source;

    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
    if (ds == Z_NULL) return Z_MEM_ERROR;
    dest->state = (struct internal_state FAR *) ds;
    *ds = *ss;
    ds->strm = dest;

    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
    ds->pending_buf = (uchf *) overlay;

    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
        ds->pending_buf == Z_NULL) {
        deflateEnd (dest);
        return Z_MEM_ERROR;
    }
    /* following zmemcpy do not work for 16-bit MSDOS */
    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);

    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;

    ds->l_desc.dyn_tree = ds->dyn_ltree;
    ds->d_desc.dyn_tree = ds->dyn_dtree;
    ds->bl_desc.dyn_tree = ds->bl_tree;

    return Z_OK;
#endif
}

/* ===========================================================================
 * Read a new buffer from the current input stream, update the adler32
 * and total number of bytes read.  All deflate() input goes through
 * this function so some applications may wish to modify it to avoid
 * allocating a large strm->next_in buffer and copying from it.
 * (See also flush_pending()).
 */
local int read_buf(strm, buf, size)
    z_streamp strm;
    Bytef *buf;
    unsigned size;
{
    unsigned len = strm->avail_in;

    if (len > size) len = size;
    if (len == 0) return 0;

    strm->avail_in  -= len;

    if (!strm->state->noheader) {
        strm->adler = adler32(strm->adler, strm->next_in, len);
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
884aa四虎影成人精品一区| 国产精品系列在线播放| 中文字幕一区二区三区视频| 久久这里只有精品视频网| 欧美一级免费观看| 91精品国产高清一区二区三区 | 欧美午夜影院一区| 色综合中文字幕国产| 国产aⅴ综合色| 成人动漫av在线| 色呦呦网站一区| 在线观看亚洲专区| 精品视频一区二区三区免费| 欧洲国内综合视频| 欧美精品日日鲁夜夜添| 日韩免费在线观看| 久久影院视频免费| 国产精品欧美一区喷水| 亚洲三级在线免费观看| 五月天网站亚洲| 精品在线观看免费| 国产福利91精品一区二区三区| 国产91色综合久久免费分享| 一本到不卡精品视频在线观看| 欧美图片一区二区三区| 日韩精品一区二区三区中文精品| 久久久精品2019中文字幕之3| 亚洲欧美在线视频| 亚洲香肠在线观看| 久久电影国产免费久久电影| av在线不卡免费看| 884aa四虎影成人精品一区| 欧美mv日韩mv国产网站| 国产精品欧美一区二区三区| 亚洲国产另类精品专区| 国产精品夜夜爽| 欧美亚洲国产一区在线观看网站| 欧美日韩高清在线播放| 精品国产一区二区三区四区四| 中文字幕亚洲不卡| 美女脱光内衣内裤视频久久影院| 99久久综合色| 2019国产精品| 亚洲成人777| 成人妖精视频yjsp地址| 欧美吞精做爰啪啪高潮| 日本一二三不卡| 强制捆绑调教一区二区| 一本到三区不卡视频| 久久久午夜精品理论片中文字幕| 一区二区三区在线观看欧美| 国产老妇另类xxxxx| 欧美日韩国产大片| 亚洲欧美一区二区久久| 国产乱码字幕精品高清av| 欧美精品日韩一区| 一区二区国产视频| 成人国产精品免费网站| 久久色中文字幕| 日本午夜精品视频在线观看 | 午夜国产精品一区| 99亚偷拍自图区亚洲| 久久精品水蜜桃av综合天堂| 麻豆精品在线观看| 欧美日本一区二区在线观看| 亚洲精品国产精华液| 99精品黄色片免费大全| 国产精品情趣视频| 成人午夜伦理影院| 国产精品入口麻豆九色| 国产成人免费在线视频| 久久综合久久综合久久| 久久精品国产99久久6| 日韩欧美电影在线| 另类小说综合欧美亚洲| 日韩精品专区在线| 精品一区二区三区免费视频| 日韩欧美资源站| 国内精品久久久久影院薰衣草| 日韩午夜在线播放| 久久97超碰国产精品超碰| 精品国一区二区三区| 国产一区二区主播在线| 久久网站热最新地址| 老司机午夜精品| 久久噜噜亚洲综合| 丰满少妇在线播放bd日韩电影| 国产精品久久久久久久午夜片 | 欧美日韩精品免费观看视频| 亚洲午夜一二三区视频| 91精品国产综合久久久久久久久久| 午夜欧美电影在线观看| 欧美一卡二卡在线| 国产精品1区二区.| 亚洲四区在线观看| 欧美精选在线播放| 极品销魂美女一区二区三区| 久久精品日产第一区二区三区高清版 | 欧美videos中文字幕| 国产成人精品免费一区二区| 国产精品美女久久久久aⅴ| 色88888久久久久久影院按摩| 日日嗨av一区二区三区四区| 精品国产一区二区三区av性色| 国产jizzjizz一区二区| 一区二区三区蜜桃网| 91精品黄色片免费大全| 高清shemale亚洲人妖| 一区二区三区中文字幕精品精品| 5566中文字幕一区二区电影| 久久99久国产精品黄毛片色诱| 国产丝袜美腿一区二区三区| 欧美亚洲日本一区| 国产高清精品在线| 亚洲欧美成aⅴ人在线观看 | 欧美一级久久久久久久大片| 日本欧美一区二区| 国产精品色婷婷久久58| 一本一道久久a久久精品综合蜜臀| 日韩精品亚洲一区二区三区免费| 久久久久国产免费免费| 欧美色偷偷大香| 狠狠色综合播放一区二区| 亚洲色图欧洲色图| 久久免费精品国产久精品久久久久| 色婷婷亚洲一区二区三区| 精品制服美女丁香| 亚洲人成亚洲人成在线观看图片| 欧美日韩在线播放三区| 国产一区二区在线观看免费| 性做久久久久久| 国产精品你懂的| 精品人在线二区三区| 欧美日韩一级大片网址| 成人黄色在线视频| 国产资源精品在线观看| 日本网站在线观看一区二区三区 | 欧美一区二区三区日韩| 91久久精品一区二区二区| 成人一级黄色片| 国产成人8x视频一区二区| 日韩成人av影视| 亚洲成av人综合在线观看| 亚洲精品视频在线观看免费| 国产精品污污网站在线观看| 久久影院视频免费| 久久亚洲一级片| 久久精品亚洲麻豆av一区二区| 日韩欧美国产精品一区| 日韩精品一区二区三区中文精品| 欧美久久免费观看| 欧美猛男超大videosgay| 欧洲精品在线观看| 91激情在线视频| 欧美午夜一区二区| 欧美午夜视频网站| 欧美日韩另类国产亚洲欧美一级| 在线一区二区三区四区| 欧美日韩免费一区二区三区| 欧美高清精品3d| 这里只有精品视频在线观看| 欧美性极品少妇| 欧美日韩国产精品成人| 欧美日韩精品免费观看视频| 91精品国产综合久久久久久久久久| 欧美军同video69gay| 日韩天堂在线观看| 国产女人aaa级久久久级| 国产精品嫩草影院com| 亚洲另类一区二区| 午夜精品福利一区二区蜜股av | 国产精品的网站| 亚洲理论在线观看| 日韩高清不卡一区| 国产一区二区成人久久免费影院 | 免费看日韩精品| 国产精品一线二线三线| www.亚洲色图.com| 欧美三级资源在线| 欧美精品一区在线观看| 亚洲精品免费播放| 亚洲一区二区三区激情| 琪琪一区二区三区| 豆国产96在线|亚洲| 亚洲色图清纯唯美| 国产91精品免费| 一本色道**综合亚洲精品蜜桃冫| 欧美在线三级电影| 26uuu国产一区二区三区| 国产精品国产a级| 日韩电影在线观看网站| 成人黄动漫网站免费app| 欧美日本乱大交xxxxx| 欧美国产日本韩| 午夜精品国产更新| 成人免费福利片| 欧美一卡二卡在线观看| 亚洲图片激情小说| 国产精品亚洲一区二区三区在线| 欧美性感一类影片在线播放|