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

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

?? example.c

?? 一款最完整的工業組態軟源代碼
?? 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: example.c,v 1.1 2004/03/16 21:45:10 drolon Exp $ */

#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在线| 亚洲另类春色国产| 欧美一卡二卡三卡| 国产精品久久夜| 久久99精品一区二区三区三区| 大尺度一区二区| 精品欧美一区二区三区精品久久| 亚洲黄色录像片| 99久久国产综合精品色伊| 视频在线观看一区二区三区| 91在线精品一区二区| 久久久亚洲精品石原莉奈| 午夜久久久久久电影| 91丝袜高跟美女视频| 国产一区二区三区香蕉| 67194成人在线观看| 亚洲综合视频在线| 91久久一区二区| 中文字幕在线不卡视频| 在线国产亚洲欧美| 国产成人在线看| 欧美刺激午夜性久久久久久久| 午夜视频在线观看一区二区| 99re免费视频精品全部| 欧美极品美女视频| 国产精品一级片| 久久这里都是精品| 国产一区二区精品久久| 精品91自产拍在线观看一区| 激情综合色播五月| 欧美色欧美亚洲另类二区| 国产精品福利电影一区二区三区四区 | 国产精品一二三四五| 国产欧美日本一区二区三区| 99精品欧美一区二区三区小说| 国产精品美女久久久久久久久 | 亚洲精品在线免费观看视频| 久久精品久久综合| wwwwxxxxx欧美| 国产传媒久久文化传媒| 国产精品久久午夜夜伦鲁鲁| 色婷婷精品大在线视频| 一区二区三区电影在线播| 欧美吞精做爰啪啪高潮| 日本强好片久久久久久aaa| 337p亚洲精品色噜噜狠狠| 轻轻草成人在线| 国产亚洲一区二区三区| 91影院在线免费观看| 亚洲国产另类精品专区| 日韩一区二区在线观看视频| 国产精品影视在线观看| 色综合久久久久网| 亚洲午夜久久久久| 精品免费日韩av| 波多野结衣中文字幕一区二区三区| 中文字幕日韩av资源站| 欧美日韩一区二区电影| 蜜臀91精品一区二区三区| 久久精品视频网| 色婷婷精品久久二区二区蜜臀av| 日本亚洲最大的色成网站www| 久久这里只有精品首页| 色综合色综合色综合色综合色综合 | 蜜桃视频一区二区三区在线观看| 国产亚洲欧美激情| 一本色道久久综合精品竹菊| 麻豆成人av在线| 亚洲欧美一区二区三区国产精品| 欧美放荡的少妇| www.性欧美| 麻豆一区二区在线| 自拍偷在线精品自拍偷无码专区 | 7777女厕盗摄久久久| 国产精品亚洲午夜一区二区三区 | 911精品产国品一二三产区 | 国产原创一区二区| 亚洲自拍偷拍麻豆| 国产视频911| 欧美一区二区三区在线看| 高清国产午夜精品久久久久久| 天天爽夜夜爽夜夜爽精品视频| 欧美韩国日本综合| 欧美大片在线观看| 欧洲一区二区av| 成人爱爱电影网址| 国产在线播放一区| 欧美日韩情趣电影| 色中色一区二区| 成人不卡免费av| 国产精品一区二区免费不卡 | 亚洲国产成人av网| 国产精品大尺度| 久久香蕉国产线看观看99| 欧美日韩不卡一区二区| 91蜜桃婷婷狠狠久久综合9色| 国产在线观看免费一区| 久久精品一二三| av成人动漫在线观看| 色综合天天狠狠| 久久夜色精品一区| 欧美日韩在线播放一区| 色婷婷久久一区二区三区麻豆| 国产精品1024| 狠狠狠色丁香婷婷综合激情| 美女脱光内衣内裤视频久久影院| 亚洲成人精品在线观看| 亚洲国产一区二区三区青草影视| ...av二区三区久久精品| 国产女人18毛片水真多成人如厕 | 91在线视频播放地址| 成人午夜免费av| 成人h精品动漫一区二区三区| 国产91露脸合集magnet| 国产+成+人+亚洲欧洲自线| 国产九色精品成人porny| 国产一区二区0| 亚洲视频免费看| 久久亚洲一级片| 久久久久成人黄色影片| 国产午夜三级一区二区三| 国产欧美一二三区| 日本一区二区三区高清不卡| 欧美激情一区二区三区在线| 国产精品久久久久久久久久久免费看 | 欧美性受极品xxxx喷水| 欧美中文字幕久久| 欧美福利电影网| 精品国产乱码久久久久久久久| 欧美白人最猛性xxxxx69交| 久久免费精品国产久精品久久久久 | 日韩精品在线一区| 2024国产精品| 亚洲视频在线观看一区| 亚洲第一电影网| 久久av资源网| 波波电影院一区二区三区| 在线中文字幕一区| 香蕉成人伊视频在线观看| 久久超碰97中文字幕| 大美女一区二区三区| 欧美一区二区三区四区久久| 欧美电视剧在线观看完整版| 18欧美乱大交hd1984| 欧美老女人第四色| 国产亚洲欧洲一区高清在线观看| 亚洲欧美日韩小说| 美国十次了思思久久精品导航| 丰满放荡岳乱妇91ww| 欧美性猛交xxxx乱大交退制版| 精品伊人久久久久7777人| 日本系列欧美系列| 99视频精品在线| 欧美国产禁国产网站cc| 色偷偷久久人人79超碰人人澡| 欧美日本精品一区二区三区| 久久久久久一级片| 夜夜操天天操亚洲| 国产一区二区女| 欧美日韩国产一二三| 欧美激情一区二区在线| 免费在线看成人av| 一本到三区不卡视频| 久久精品亚洲精品国产欧美| 亚洲另类一区二区| 黄色日韩网站视频| 91精品中文字幕一区二区三区| 国产精品福利电影一区二区三区四区| 男女男精品视频网| 在线精品国精品国产尤物884a| 国产一区二区三区精品视频| 欧美高清hd18日本| 一区二区三区国产精华| 成人久久视频在线观看| 91精品免费在线| 亚洲国产人成综合网站| 97se亚洲国产综合自在线不卡 | 欧美伊人精品成人久久综合97| 91成人免费网站| 欧美一区二区视频在线观看2022| 久久综合资源网| 亚洲人妖av一区二区| 亚洲高清不卡在线| 国产精品一区二区久激情瑜伽| 色哟哟亚洲精品| 欧美精品一区视频| 一区二区三区在线免费视频| 九色综合狠狠综合久久| 97超碰欧美中文字幕| 精品久久久久久亚洲综合网 | 精品一区二区免费看| 91麻豆国产精品久久| 日韩精品中文字幕在线一区| 综合久久久久久久| 国产综合色在线| 欧美人狂配大交3d怪物一区 | 中文字幕亚洲精品在线观看| 日韩在线观看一区二区| 秋霞电影一区二区| av在线播放不卡|