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

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

?? example.c

?? 許多壓縮算法都用到了ZLIP算法
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* example.c -- usage example of the zlib compression library * Copyright (C) 1995-2003 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>#else   extern void exit  OF((int));#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一区二区三区免费野_久草精品视频
在线观看不卡视频| 欧美三级资源在线| 九九国产精品视频| 青青青爽久久午夜综合久久午夜| 午夜精彩视频在线观看不卡| 天天综合日日夜夜精品| 天天操天天干天天综合网| 亚洲综合色视频| 丝袜诱惑亚洲看片| 青青草成人在线观看| 加勒比av一区二区| 成人午夜在线播放| 色狠狠色狠狠综合| 欧美精品1区2区3区| 91精品国产高清一区二区三区 | 亚洲免费观看视频| 亚洲三级电影网站| 亚洲.国产.中文慕字在线| 日本 国产 欧美色综合| 国产一区二区三区免费看| 岛国精品在线观看| 欧美三级三级三级爽爽爽| 日韩精品一区二区三区老鸭窝| 精品久久久久久综合日本欧美| 久久久国产一区二区三区四区小说 | 欧美日韩mp4| 欧美不卡视频一区| 综合激情网...| 蓝色福利精品导航| 色欲综合视频天天天| 日韩欧美黄色影院| 亚洲视频在线观看三级| 秋霞成人午夜伦在线观看| 国产99久久久国产精品潘金 | 91成人网在线| 久久综合五月天婷婷伊人| 亚洲欧美日韩中文字幕一区二区三区| 日韩成人伦理电影在线观看| 国产成人综合视频| 欧美军同video69gay| 中文字幕欧美激情一区| 午夜伊人狠狠久久| 91在线视频18| 久久精品综合网| 人人超碰91尤物精品国产| 99免费精品视频| 久久一夜天堂av一区二区三区| 一区二区三区**美女毛片| 国产精品一区免费视频| 欧美午夜精品理论片a级按摩| 国产日本亚洲高清| 免费成人深夜小野草| 91国偷自产一区二区三区成为亚洲经典| 26uuuu精品一区二区| 爽好久久久欧美精品| av欧美精品.com| 中文在线资源观看网站视频免费不卡 | 一区二区三区av电影 | 日韩精品国产欧美| 在线中文字幕一区| 亚洲精品第一国产综合野| 国产风韵犹存在线视精品| 日韩欧美色电影| 日韩影院免费视频| 91麻豆精品国产自产在线| 一区二区三区免费| 在线视频你懂得一区二区三区| 国产精品免费丝袜| 99国产精品久久久久| 国产丝袜在线精品| 国产成人av电影在线播放| 久久久久国色av免费看影院| 国产一区二区主播在线| 精品日产卡一卡二卡麻豆| 美女视频黄免费的久久| 欧美一级黄色录像| 激情成人综合网| 久久久久久久av麻豆果冻| 国产一区二区调教| 亚洲国产精品精华液2区45| 成人午夜碰碰视频| 亚洲视频小说图片| 欧美日韩午夜在线| 久久福利资源站| 国产日韩欧美不卡在线| heyzo一本久久综合| 一区二区三区在线观看视频| 在线一区二区观看| 五月天丁香久久| 久久青草国产手机看片福利盒子 | 99这里只有久久精品视频| 国产精品久久久久久久久动漫| 99久久精品国产观看| 亚洲成人动漫在线免费观看| 日韩美女在线视频| 波多野结衣亚洲一区| 一区二区三区四区中文字幕| 欧美一区二区三区日韩| 国产精品99久久久| 亚洲人成网站色在线观看| 欧美精品 国产精品| 国产麻豆视频精品| 一区二区三区中文字幕| 欧美大片一区二区| 91伊人久久大香线蕉| 亚洲成人资源网| 欧美激情综合网| 欧美日韩国产综合视频在线观看| 国产制服丝袜一区| 亚洲国产精品久久久男人的天堂 | 国产美女在线精品| 亚洲一区二区高清| 欧美激情综合五月色丁香小说| 欧美三级韩国三级日本三斤| 国产精品99久久不卡二区| 亚洲成人在线免费| 中文字幕日韩精品一区| 欧美一级欧美一级在线播放| 99视频在线精品| 狠狠色丁香久久婷婷综| 亚洲大尺度视频在线观看| 国产精品区一区二区三| 7777精品伊人久久久大香线蕉| av在线综合网| 国产精品99久| 久久99蜜桃精品| 亚洲国产精品精华液网站| 中文字幕乱码亚洲精品一区 | 国产精品久久久久久一区二区三区| 欧美综合欧美视频| 色综合久久88色综合天天6| 精品在线你懂的| 蜜臀av一区二区在线观看| 亚洲成人免费视| 亚洲一区二区3| 亚洲免费在线视频一区 二区| 久久久精品日韩欧美| 精品少妇一区二区| 欧美一卡二卡在线观看| 欧美视频日韩视频在线观看| 91麻豆国产精品久久| 粉嫩13p一区二区三区| 国产河南妇女毛片精品久久久| 日本伊人色综合网| 免费在线一区观看| 麻豆专区一区二区三区四区五区| 亚洲成av人综合在线观看| 亚洲第一会所有码转帖| 香蕉成人伊视频在线观看| 亚州成人在线电影| 日本午夜一本久久久综合| 亚洲一区二区在线播放相泽| 一区二区免费看| 亚洲成av人片在线| 日韩电影一区二区三区四区| 日韩电影一区二区三区四区| 日本少妇一区二区| 麻豆精品一区二区av白丝在线| 麻豆国产精品777777在线| 奇米色一区二区| 国产呦精品一区二区三区网站| 国产精品一二三| 成人av网址在线| 欧美最新大片在线看| 欧美日韩mp4| 久久综合九色综合久久久精品综合| 欧美v亚洲v综合ⅴ国产v| 国产无人区一区二区三区| 1区2区3区精品视频| 洋洋成人永久网站入口| 日韩综合小视频| 国产福利一区二区三区| 一本色道久久综合精品竹菊| 欧美吻胸吃奶大尺度电影| 在线不卡中文字幕| 久久久久久久久97黄色工厂| 亚洲婷婷国产精品电影人久久| 亚洲国产wwwccc36天堂| 另类调教123区| a级精品国产片在线观看| 欧美日韩午夜精品| 久久久精品免费免费| 亚洲视频综合在线| 美女免费视频一区| 91婷婷韩国欧美一区二区| 337p亚洲精品色噜噜噜| 中文幕一区二区三区久久蜜桃| 一区二区三区不卡在线观看| 激情综合一区二区三区| 91一区二区在线观看| 日韩精品一区二区三区中文精品| 国产精品理论在线观看| 日本不卡视频一二三区| av激情成人网| 日韩欧美一卡二卡| 亚洲综合一区在线| 成人午夜免费视频| 精品国产精品网麻豆系列| 亚洲专区一二三| 不卡区在线中文字幕|