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

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

?? example.c

?? SDL文件。SDL_ERROwenjian.....
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* example.c -- usage example of the zlib compression library
 * Copyright (C) 1995-2004 Jean-loup Gailly.
 * For conditions of distribution and use, see copyright notice in zlib.h
 */

/* @(#) $Id$ */

#include <stdio.h>
#include "zlib.h"

#ifdef STDC
#  include <string.h>
#  include <stdlib.h>
#endif

#if defined(VMS) || defined(RISCOS)
#  define TESTFILE "foo-gz"
#else
#  define TESTFILE "foo.gz"
#endif

#define CHECK_ERR(err, msg) { \
    if (err != Z_OK) { \
        fprintf(stderr, "%s error: %d\n", msg, err); \
        exit(1); \
    } \
}

const char hello[] = "hello, hello!";
/* "hello world" would be more standard, but the repeated "hello"
 * stresses the compression code better, sorry...
 */

const char dictionary[] = "hello";
uLong dictId; /* Adler32 value of the dictionary */

void test_compress      OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
void test_gzio          OF((const char *fname,
                            Byte *uncompr, uLong uncomprLen));
void test_deflate       OF((Byte *compr, uLong comprLen));
void test_inflate       OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
void test_large_deflate OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
void test_large_inflate OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
void test_flush         OF((Byte *compr, uLong *comprLen));
void test_sync          OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
void test_dict_deflate  OF((Byte *compr, uLong comprLen));
void test_dict_inflate  OF((Byte *compr, uLong comprLen,
                            Byte *uncompr, uLong uncomprLen));
int  main               OF((int argc, char *argv[]));

/* ===========================================================================
 * Test compress() and uncompress()
 */
void test_compress(compr, comprLen, uncompr, uncomprLen)
    Byte *compr, *uncompr;
    uLong comprLen, uncomprLen;
{
    int err;
    uLong len = (uLong)strlen(hello)+1;

    err = compress(compr, &comprLen, (const Bytef*)hello, len);
    CHECK_ERR(err, "compress");

    strcpy((char*)uncompr, "garbage");

    err = uncompress(uncompr, &uncomprLen, compr, comprLen);
    CHECK_ERR(err, "uncompress");

    if (strcmp((char*)uncompr, hello)) {
        fprintf(stderr, "bad uncompress\n");
        exit(1);
    } else {
        printf("uncompress(): %s\n", (char *)uncompr);
    }
}

/* ===========================================================================
 * Test read/write of .gz files
 */
void test_gzio(fname, uncompr, uncomprLen)
    const char *fname; /* compressed file name */
    Byte *uncompr;
    uLong uncomprLen;
{
#ifdef NO_GZCOMPRESS
    fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
#else
    int err;
    int len = (int)strlen(hello)+1;
    gzFile file;
    z_off_t pos;

    file = gzopen(fname, "wb");
    if (file == NULL) {
        fprintf(stderr, "gzopen error\n");
        exit(1);
    }
    gzputc(file, 'h');
    if (gzputs(file, "ello") != 4) {
        fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
        exit(1);
    }
    if (gzprintf(file, ", %s!", "hello") != 8) {
        fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
        exit(1);
    }
    gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
    gzclose(file);

    file = gzopen(fname, "rb");
    if (file == NULL) {
        fprintf(stderr, "gzopen error\n");
        exit(1);
    }
    strcpy((char*)uncompr, "garbage");

    if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
        fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
        exit(1);
    }
    if (strcmp((char*)uncompr, hello)) {
        fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
        exit(1);
    } else {
        printf("gzread(): %s\n", (char*)uncompr);
    }

    pos = gzseek(file, -8L, SEEK_CUR);
    if (pos != 6 || gztell(file) != pos) {
        fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
                (long)pos, (long)gztell(file));
        exit(1);
    }

    if (gzgetc(file) != ' ') {
        fprintf(stderr, "gzgetc error\n");
        exit(1);
    }

    if (gzungetc(' ', file) != ' ') {
        fprintf(stderr, "gzungetc error\n");
        exit(1);
    }

    gzgets(file, (char*)uncompr, (int)uncomprLen);
    if (strlen((char*)uncompr) != 7) { /* " hello!" */
        fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
        exit(1);
    }
    if (strcmp((char*)uncompr, hello + 6)) {
        fprintf(stderr, "bad gzgets after gzseek\n");
        exit(1);
    } else {
        printf("gzgets() after gzseek: %s\n", (char*)uncompr);
    }

    gzclose(file);
#endif
}

/* ===========================================================================
 * Test deflate() with small buffers
 */
void test_deflate(compr, comprLen)
    Byte *compr;
    uLong comprLen;
{
    z_stream c_stream; /* compression stream */
    int err;
    uLong len = (uLong)strlen(hello)+1;

    c_stream.zalloc = (alloc_func)0;
    c_stream.zfree = (free_func)0;
    c_stream.opaque = (voidpf)0;

    err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
    CHECK_ERR(err, "deflateInit");

    c_stream.next_in  = (Bytef*)hello;
    c_stream.next_out = compr;

    while (c_stream.total_in != len && c_stream.total_out < comprLen) {
        c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
        err = deflate(&c_stream, Z_NO_FLUSH);
        CHECK_ERR(err, "deflate");
    }
    /* Finish the stream, still forcing small buffers: */
    for (;;) {
        c_stream.avail_out = 1;
        err = deflate(&c_stream, Z_FINISH);
        if (err == Z_STREAM_END) break;
        CHECK_ERR(err, "deflate");
    }

    err = deflateEnd(&c_stream);
    CHECK_ERR(err, "deflateEnd");
}

/* ===========================================================================
 * Test inflate() with small buffers
 */
void test_inflate(compr, comprLen, uncompr, uncomprLen)
    Byte *compr, *uncompr;
    uLong comprLen, uncomprLen;
{
    int err;
    z_stream d_stream; /* decompression stream */

    strcpy((char*)uncompr, "garbage");

    d_stream.zalloc = (alloc_func)0;
    d_stream.zfree = (free_func)0;
    d_stream.opaque = (voidpf)0;

    d_stream.next_in  = compr;
    d_stream.avail_in = 0;
    d_stream.next_out = uncompr;

    err = inflateInit(&d_stream);
    CHECK_ERR(err, "inflateInit");

    while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
        d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
        err = inflate(&d_stream, Z_NO_FLUSH);
        if (err == Z_STREAM_END) break;
        CHECK_ERR(err, "inflate");
    }

    err = inflateEnd(&d_stream);
    CHECK_ERR(err, "inflateEnd");

    if (strcmp((char*)uncompr, hello)) {
        fprintf(stderr, "bad inflate\n");
        exit(1);
    } else {
        printf("inflate(): %s\n", (char *)uncompr);
    }
}

/* ===========================================================================
 * Test deflate() with large buffers and dynamic change of compression level
 */
void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
    Byte *compr, *uncompr;
    uLong comprLen, uncomprLen;
{
    z_stream c_stream; /* compression stream */
    int err;

    c_stream.zalloc = (alloc_func)0;
    c_stream.zfree = (free_func)0;
    c_stream.opaque = (voidpf)0;

    err = deflateInit(&c_stream, Z_BEST_SPEED);
    CHECK_ERR(err, "deflateInit");

    c_stream.next_out = compr;
    c_stream.avail_out = (uInt)comprLen;

    /* At this point, uncompr is still mostly zeroes, so it should compress
     * very well:
     */
    c_stream.next_in = uncompr;
    c_stream.avail_in = (uInt)uncomprLen;
    err = deflate(&c_stream, Z_NO_FLUSH);
    CHECK_ERR(err, "deflate");
    if (c_stream.avail_in != 0) {
        fprintf(stderr, "deflate not greedy\n");
        exit(1);
    }

    /* Feed in already compressed data and switch to no compression: */
    deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
    c_stream.next_in = compr;
    c_stream.avail_in = (uInt)comprLen/2;
    err = deflate(&c_stream, Z_NO_FLUSH);
    CHECK_ERR(err, "deflate");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合视频网| 欧美综合视频在线观看| 亚洲卡通欧美制服中文| 欧美成人aa大片| 欧美色手机在线观看| 色综合视频在线观看| 国产91丝袜在线播放九色| 九九久久精品视频 | 国产精品伦理一区二区| 91精品综合久久久久久| 在线精品视频免费播放| 91亚洲国产成人精品一区二区三 | 青青草国产精品亚洲专区无| 一区二区三区**美女毛片| 亚洲欧美在线高清| 国产精品国产三级国产专播品爱网| 精品国产一二三| 日韩欧美在线网站| 精品视频一区 二区 三区| 欧美乱熟臀69xxxxxx| 欧美人妇做爰xxxⅹ性高电影| 欧美中文字幕久久| 欧美日韩高清一区二区不卡| 99vv1com这只有精品| 91视视频在线直接观看在线看网页在线看| 国产酒店精品激情| 成人性生交大片免费看中文| 成人激情综合网站| 国产一区二区美女诱惑| 国模一区二区三区白浆| 成人污视频在线观看| av不卡在线观看| 91浏览器入口在线观看| 色婷婷久久99综合精品jk白丝| av在线不卡观看免费观看| 91网上在线视频| 欧美日韩精品福利| 精品人伦一区二区色婷婷| 国产色一区二区| 亚洲国产精品一区二区久久恐怖片 | 高清shemale亚洲人妖| 91一区二区三区在线观看| 欧美日韩国产高清一区二区| 久久亚洲一区二区三区四区| 久久综合999| 亚洲蜜臀av乱码久久精品| 视频在线在亚洲| 肉丝袜脚交视频一区二区| 国产一区二区三区观看| 99久久精品国产一区| 制服丝袜成人动漫| 中文字幕一区二区三区在线不卡| 五月激情综合婷婷| 五月婷婷另类国产| 亚洲一区二区在线免费看| 久久se这里有精品| 91视频.com| 6080国产精品一区二区| 国产精品丝袜久久久久久app| 亚洲第一福利视频在线| 国产精品一区二区你懂的| 51精品秘密在线观看| 中文字幕在线播放不卡一区| 免费精品99久久国产综合精品| 经典三级一区二区| 91精品视频网| 亚洲成人久久影院| 成人av在线观| 久久丝袜美腿综合| 日本不卡一区二区三区| 久久精品国产99久久6| 91久久精品网| 国产精品国产精品国产专区不蜜| 日韩精品91亚洲二区在线观看| 日韩视频免费直播| 欧美日本高清视频在线观看| 国产精品久久久久一区二区三区 | 成人三级伦理片| 欧美成人免费网站| 亚洲自拍偷拍九九九| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美伊人久久久久久久久影院 | 国产一区二区不卡老阿姨| 91精品国产色综合久久不卡电影 | 色综合天天综合色综合av| 久久精品视频一区| 捆绑调教一区二区三区| 欧美一区二区三区视频免费播放| 亚洲免费av网站| 在线免费观看日本欧美| 欧美国产精品一区二区三区| 午夜欧美在线一二页| 欧美一区二区在线看| 国产自产高清不卡| 中文成人av在线| 欧美日韩一卡二卡三卡| 国产综合久久久久久久久久久久| 中文字幕国产一区| 欧美视频一区二区在线观看| 麻豆精品在线播放| 国产精品毛片大码女人| 欧美日韩一区二区三区在线看| 裸体歌舞表演一区二区| 综合久久久久久久| 日韩一级成人av| 91美女精品福利| 精品一区二区在线看| 亚洲精品国产一区二区精华液 | 国产精品乱码一区二区三区软件| 91免费国产在线观看| 日韩高清在线电影| 国产精品久久久久久久裸模| 欧美丰满美乳xxx高潮www| 懂色av噜噜一区二区三区av| 亚洲成精国产精品女| 中文字幕第一页久久| 日韩女同互慰一区二区| 一本久久精品一区二区| 国产高清视频一区| 日本中文字幕一区二区视频| 国产精品久久久一本精品| 日韩欧美一区二区视频| 日本韩国精品在线| 国产激情一区二区三区桃花岛亚洲| 亚洲国产一区视频| 椎名由奈av一区二区三区| 日韩欧美国产精品| 欧美日韩成人综合| 99视频在线精品| 国产一区二区免费视频| 免费xxxx性欧美18vr| 一区二区三区四区不卡在线| 欧美一级理论片| 欧美性感一区二区三区| 91免费在线视频观看| www.综合网.com| eeuss鲁片一区二区三区 | 人禽交欧美网站| 亚洲国产一区视频| 一区二区三区在线不卡| 日韩美女久久久| 亚洲视频在线观看三级| 中文字幕一区二区三区视频| 欧美激情在线观看视频免费| 国产无遮挡一区二区三区毛片日本| 日韩欧美精品三级| 日韩精品一区国产麻豆| 精品国产网站在线观看| 欧美精品一区二| 精品久久久久一区| 久久久精品中文字幕麻豆发布| 精品久久久久久久久久久院品网| 日韩三级免费观看| 亚洲精品一区二区三区福利| 久久综合视频网| 久久久99精品久久| 国产精品午夜电影| 自拍av一区二区三区| 夜夜嗨av一区二区三区中文字幕| 亚洲综合精品久久| 免费成人性网站| 精品一区二区三区视频| 国产99久久久国产精品潘金网站| 国产不卡在线视频| 一本大道久久a久久综合| 欧美无砖砖区免费| 日韩免费一区二区三区在线播放| 日韩亚洲电影在线| 中文在线资源观看网站视频免费不卡| 国产人成亚洲第一网站在线播放| |精品福利一区二区三区| 亚洲国产精品久久人人爱| 免费在线观看视频一区| 高清免费成人av| 在线免费观看日本欧美| 精品三级在线看| 亚洲色图欧洲色图婷婷| 视频一区二区不卡| 国产精品99久久不卡二区| 色94色欧美sute亚洲线路一久| 91精品国产综合久久国产大片 | 欧美日韩国产首页在线观看| 日韩一级二级三级| 国产精品进线69影院| 视频一区免费在线观看| 国产一区二区三区香蕉| 一本久久精品一区二区| 精品日韩欧美一区二区| 亚洲欧美日韩精品久久久久| 亚洲国产人成综合网站| 国产成人免费视频| 欧美日本不卡视频| 中文字幕一区二区三区蜜月| 奇米在线7777在线精品| 99久久精品免费看| 久久久久一区二区三区四区| 舔着乳尖日韩一区| 色综合久久中文综合久久牛| 精品成人私密视频| 亚洲成av人片|