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

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

?? deflate.c

?? 一款最完整的工業組態軟源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
    }
    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
    strm->adler =
#ifdef GZIP
        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
#endif
        adler32(0L, Z_NULL, 0);
    s->last_flush = Z_NO_FLUSH;

    _tr_init(s);
    lm_init(s);

    return Z_OK;
}

/* ========================================================================= */
int ZEXPORT deflatePrime (strm, bits, value)
    z_streamp strm;
    int bits;
    int value;
{
    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    strm->state->bi_valid = bits;
    strm->state->bi_buf = (ush)(value & ((1 << bits) - 1));
    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;

#ifdef FASTEST
    if (level != 0) level = 1;
#else
    if (level == Z_DEFAULT_COMPRESSION) level = 6;
#endif
    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_RLE) {
        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;
}

/* =========================================================================
 * For the default windowBits of 15 and memLevel of 8, this function returns
 * a close to exact, as well as small, upper bound on the compressed size.
 * They are coded as constants here for a reason--if the #define's are
 * changed, then this function needs to be changed as well.  The return
 * value for 15 and 8 only works for those exact settings.
 *
 * For any setting other than those defaults for windowBits and memLevel,
 * the value returned is a conservative worst case for the maximum expansion
 * resulting from using fixed blocks instead of stored blocks, which deflate
 * can emit on compressed data for some combinations of the parameters.
 *
 * This function could be more sophisticated to provide closer upper bounds
 * for every combination of windowBits and memLevel, as well as wrap.
 * But even the conservative upper bound of about 14% expansion does not
 * seem onerous for output buffer allocation.
 */
uLong ZEXPORT deflateBound(strm, sourceLen)
    z_streamp strm;
    uLong sourceLen;
{
    deflate_state *s;
    uLong destLen;

    /* conservative upper bound */
    destLen = sourceLen +
              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;

    /* if can't get parameters, return conservative bound */
    if (strm == Z_NULL || strm->state == Z_NULL)
        return destLen;

    /* if not default parameters, return conservative bound */
    s = strm->state;
    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
        return destLen;

    /* default settings: return tight bound for that case */
    return compressBound(sourceLen);
}

/* =========================================================================
 * 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 header */
    if (s->status == INIT_STATE) {
#ifdef GZIP
        if (s->wrap == 2) {
            put_byte(s, 31);
            put_byte(s, 139);
            put_byte(s, 8);
            put_byte(s, 0);
            put_byte(s, 0);
            put_byte(s, 0);
            put_byte(s, 0);
            put_byte(s, 0);
            put_byte(s, s->level == 9 ? 2 :
                        (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
                         4 : 0));
            put_byte(s, 255);
            s->status = BUSY_STATE;
            strm->adler = crc32(0L, Z_NULL, 0);
        }
        else
#endif
        {
            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
            uInt level_flags;

            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
                level_flags = 0;
            else if (s->level < 6)
                level_flags = 1;
            else if (s->level == 6)
                level_flags = 2;
            else
                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 = adler32(0L, Z_NULL, 0);
        }
    }

    /* 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_BUF_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->wrap <= 0) return Z_STREAM_END;

    /* Write the trailer */
#ifdef GZIP
    if (s->wrap == 2) {
        put_byte(s, (Byte)(strm->adler & 0xff));
        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
        put_byte(s, (Byte)(strm->total_in & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
    }
    else
#endif
    {
        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.
     */
    if (s->wrap > 0) s->wrap = -s->wrap; /* 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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区精品婷婷| 成人午夜av电影| 久久超级碰视频| 国产电影一区二区三区| 99re8在线精品视频免费播放| 日本乱人伦aⅴ精品| 91精品福利在线一区二区三区| 久久久精品国产免大香伊| 一区免费观看视频| 日韩经典一区二区| 国产成人av电影在线| 欧美亚洲动漫制服丝袜| 日韩欧美国产综合一区 | 天堂一区二区在线免费观看| 久久91精品久久久久久秒播| 99麻豆久久久国产精品免费优播| 欧美男生操女生| 亚洲国产精品ⅴa在线观看| 亚洲国产精品一区二区www在线| 韩国精品久久久| 欧美日韩专区在线| 日本一区二区免费在线观看视频 | 97超碰欧美中文字幕| 欧美猛男超大videosgay| 久久久精品天堂| 亚洲mv在线观看| 成人丝袜18视频在线观看| 宅男噜噜噜66一区二区66| 国产农村妇女精品| 另类专区欧美蜜桃臀第一页| 不卡的av在线| 久久午夜免费电影| 日本在线不卡视频一二三区| 91毛片在线观看| 亚洲精品在线三区| 亚洲二区在线观看| 99精品久久99久久久久| 精品久久久网站| 日韩电影免费在线观看网站| 色噜噜狠狠色综合中国| 久久精品欧美日韩精品| 日本中文字幕一区二区视频| 国产午夜精品久久久久久久 | 欧美日韩国产美| 国产精品久久777777| 强制捆绑调教一区二区| 欧美性生活一区| 亚洲三级在线播放| 国产一区二区三区蝌蚪| 91麻豆精品久久久久蜜臀| 亚洲欧美一区二区三区极速播放| 国产成人自拍高清视频在线免费播放| 欧美一区二区美女| 亚洲资源在线观看| 色狠狠综合天天综合综合| 国产精品女同互慰在线看 | 久久久久久久久免费| 日本成人在线电影网| 欧美吻胸吃奶大尺度电影| 亚洲少妇30p| 成人免费黄色大片| 久久久综合网站| 国产一区免费电影| 精品国产一区二区三区久久影院| 奇米精品一区二区三区在线观看| 在线播放一区二区三区| 亚洲国产精品视频| 在线免费观看不卡av| 亚洲四区在线观看| 色综合久久天天综合网| 中文字幕一区二区在线观看| 成人动漫av在线| 91在线视频免费91| 美女视频黄a大片欧美| 欧美日韩不卡一区| 亚洲欧美日本韩国| 91免费视频网| 专区另类欧美日韩| 亚洲国产精品欧美一二99| 琪琪一区二区三区| 国产一区二区三区最好精华液| 日韩免费成人网| 成人激情视频网站| 亚洲图片一区二区| 日韩美女在线视频| 9人人澡人人爽人人精品| 亚洲成人在线免费| 国产午夜精品一区二区| 麻豆精品精品国产自在97香蕉| 国产一级精品在线| 亚洲三级在线免费| 欧美tickle裸体挠脚心vk| 91在线丨porny丨国产| 日韩成人午夜精品| 国产精品久久国产精麻豆99网站| 欧美日韩性生活| 国产99精品国产| 亚洲成av人片观看| 国产欧美视频在线观看| 69堂成人精品免费视频| 国产69精品久久99不卡| 午夜婷婷国产麻豆精品| 国产欧美精品一区二区三区四区| 欧美电影一区二区三区| 国产另类ts人妖一区二区| 亚洲一区av在线| 欧美激情一区二区三区在线| 国产激情偷乱视频一区二区三区 | 国产精品亚洲一区二区三区妖精| 亚洲欧美乱综合| 精品91自产拍在线观看一区| 欧美影院一区二区| 处破女av一区二区| 久久久久青草大香线综合精品| 亚洲成人一二三| 欧美成人猛片aaaaaaa| 色哟哟一区二区三区| 国产一区在线观看麻豆| 亚洲国产精品久久久久秋霞影院| 中文在线免费一区三区高中清不卡| 欧美日韩电影在线播放| youjizz国产精品| 极品尤物av久久免费看| 亚洲aaa精品| 亚洲欧美在线视频| 国产午夜精品在线观看| 日韩三级视频在线看| 欧美三电影在线| 色先锋资源久久综合| 成人午夜免费av| 狠狠色狠狠色综合日日91app| 婷婷国产v国产偷v亚洲高清| 亚洲裸体xxx| 中文字幕一区二区三区色视频| 久久先锋影音av鲁色资源网| 日韩美女主播在线视频一区二区三区 | 久久婷婷国产综合国色天香| 91精品国产综合久久精品性色| 一本高清dvd不卡在线观看| 成人网在线免费视频| 国产成人精品网址| 久久99久久精品欧美| 奇米精品一区二区三区在线观看| 午夜成人免费电影| 一区二区三区毛片| 亚洲精品视频在线观看免费| 国产精品久久久久久久裸模| 欧美国产激情一区二区三区蜜月| 精品日韩一区二区三区免费视频| 欧美肥大bbwbbw高潮| 欧美日韩精品高清| 精品视频免费在线| 欧美亚洲国产一区二区三区 | 国产一区亚洲一区| 国产尤物一区二区| 国产一区二区三区免费看| 韩国av一区二区| 国产一区二区三区久久久 | 午夜精品福利一区二区三区av| 一区二区三区91| 亚洲综合丝袜美腿| 亚洲一区在线视频观看| 香蕉影视欧美成人| 男女视频一区二区| 另类小说欧美激情| 国产综合色精品一区二区三区| 国产一区 二区| 成人免费视频视频在线观看免费| 高清成人在线观看| 91在线观看污| 在线亚洲免费视频| 欧美日韩五月天| 欧美一区二区三区免费| 精品乱码亚洲一区二区不卡| 久久精品一区四区| 国产嫩草影院久久久久| 亚洲视频一区二区在线| 亚洲女同ⅹxx女同tv| 午夜视频在线观看一区| 日本最新不卡在线| 国产在线播放一区| 99久久精品免费| 在线观看区一区二| 91麻豆精品久久久久蜜臀| 精品播放一区二区| 亚洲国产精品成人久久综合一区| 亚洲日本中文字幕区| 亚洲成人免费影院| 极品少妇一区二区三区精品视频 | 亚洲成人av在线电影| 青娱乐精品视频在线| 国产精品自产自拍| 99在线精品视频| 欧美日韩一区二区三区在线看| 日韩免费在线观看| 国产精品你懂的在线| 亚洲在线一区二区三区| 乱中年女人伦av一区二区| 粉嫩绯色av一区二区在线观看| 欧美在线你懂的|