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

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

?? example.c

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? 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一区二区三区免费野_久草精品视频
久久精品国产亚洲aⅴ | 国产91精品一区二区麻豆网站| 香蕉加勒比综合久久| 亚洲国产日日夜夜| 一区二区三区在线看| 亚洲精品国产精品乱码不99| 中文字幕一区二区三区不卡在线 | 偷拍日韩校园综合在线| 五月天视频一区| 日韩电影在线看| 麻豆成人久久精品二区三区红 | 日本网站在线观看一区二区三区| 一区二区三区中文字幕| 亚洲一区二区三区自拍| 亚洲一区在线观看网站| 日韩精品91亚洲二区在线观看| 三级不卡在线观看| 精品一区二区精品| 国产乱对白刺激视频不卡| 懂色一区二区三区免费观看| 91丨porny丨首页| 欧美午夜一区二区| 日韩女优毛片在线| 久久久久久久久久美女| 欧美高清在线一区| 亚洲免费观看视频| 天天av天天翘天天综合网色鬼国产 | 国产精品久久久久久户外露出 | 青青国产91久久久久久| 国产综合色在线| 成人av午夜电影| 欧美色综合久久| 精品福利在线导航| 国产精品毛片大码女人| 香蕉久久夜色精品国产使用方法 | 国产精品免费久久| 夜夜操天天操亚洲| 蜜臀国产一区二区三区在线播放| 国产乱子轮精品视频| 色婷婷一区二区三区四区| 欧美精品777| 国产农村妇女毛片精品久久麻豆| 亚洲免费在线电影| 久久er精品视频| 99综合影院在线| 91精品在线麻豆| 欧美精彩视频一区二区三区| 亚洲在线观看免费视频| 精品无码三级在线观看视频| 99久久99久久精品免费观看| 欧美一级片在线看| 日韩一区有码在线| 久久国内精品视频| 欧洲精品一区二区| 国产亚洲综合av| 亚洲国产va精品久久久不卡综合| 久久不见久久见免费视频7| 91啦中文在线观看| 精品日韩欧美在线| 一区二区三区四区在线免费观看| 久久精品国产77777蜜臀| 色综合久久天天| 久久精品男人天堂av| 石原莉奈一区二区三区在线观看| 成人性生交大片免费看在线播放| 678五月天丁香亚洲综合网| 国产精品剧情在线亚洲| 狠狠网亚洲精品| 欧美日韩国产综合草草| 亚洲天堂精品在线观看| 国产资源精品在线观看| 欧美精品 日韩| 亚洲主播在线播放| 成人午夜电影小说| 一区二区三区高清在线| 国产麻豆精品theporn| 国产午夜精品理论片a级大结局 | 国产精品情趣视频| 麻豆成人91精品二区三区| 日韩高清在线电影| av在线一区二区| 国产清纯在线一区二区www| 日韩精品1区2区3区| 欧美三级资源在线| 综合色中文字幕| 成人一级黄色片| 中文字幕乱码久久午夜不卡 | 精品一区中文字幕| 3d动漫精品啪啪1区2区免费| 亚洲精品视频在线观看网站| 成人a免费在线看| 日本一区二区三区电影| 国产成人av一区二区三区在线 | 色综合视频一区二区三区高清| 亚洲国产岛国毛片在线| 国产麻豆成人精品| 久久久久9999亚洲精品| 国产自产v一区二区三区c| 精品不卡在线视频| 国产在线播精品第三| 精品精品国产高清a毛片牛牛 | 热久久国产精品| 这里只有精品免费| 午夜精品久久久久久不卡8050| 欧美三日本三级三级在线播放| 亚洲制服丝袜av| 欧美四级电影网| 天堂av在线一区| 69堂亚洲精品首页| 免费在线一区观看| 精品卡一卡二卡三卡四在线| 久久精品国产亚洲5555| 久久免费午夜影院| 国产精品一区二区在线看| 久久嫩草精品久久久精品一| 国产成人精品影视| 中文字幕制服丝袜成人av| 99国产精品视频免费观看| 亚洲另类春色国产| 欧美日韩激情在线| 日韩不卡一二三区| 精品福利视频一区二区三区| 国产精品一区久久久久| 国产精品传媒入口麻豆| 色老头久久综合| 午夜欧美2019年伦理 | 久久狠狠亚洲综合| 欧美国产精品v| 在线观看视频一区二区| 午夜伦欧美伦电影理论片| 欧美videossexotv100| 国产成人精品三级| 洋洋av久久久久久久一区| 91麻豆精品国产91久久久久久| 精品一区精品二区高清| 国产精品久久久久久久岛一牛影视 | 国产精品家庭影院| 欧美区一区二区三区| 精品一区二区久久| 亚洲另类春色国产| 日韩精品在线一区| av成人免费在线观看| 亚洲一区在线观看免费| 精品少妇一区二区三区在线视频| 国产suv精品一区二区883| 一区二区三区在线视频免费观看| 欧美一级理论性理论a| 国产超碰在线一区| 天天亚洲美女在线视频| 国产欧美一区视频| 91麻豆精品国产91久久久久久久久| 国产精品中文字幕欧美| 香蕉久久一区二区不卡无毒影院| 久久免费的精品国产v∧| 一本大道av伊人久久综合| 精品一区二区三区视频在线观看| 综合欧美亚洲日本| 精品国产免费久久| 欧洲精品视频在线观看| 国产精品中文字幕日韩精品| 午夜亚洲国产au精品一区二区| 国产欧美日韩在线视频| 91麻豆精品国产91久久久久久| 成人激情小说乱人伦| 美美哒免费高清在线观看视频一区二区| 中文字幕欧美国产| 欧美v国产在线一区二区三区| 在线日韩av片| 国产成人精品亚洲午夜麻豆| 日本不卡不码高清免费观看| 亚洲卡通欧美制服中文| 久久综合九色综合欧美亚洲| 精品视频在线视频| 91免费版pro下载短视频| 精品亚洲国内自在自线福利| 亚洲国产va精品久久久不卡综合| 国产精品热久久久久夜色精品三区| 日韩你懂的在线观看| 欧美日韩国产小视频| 91麻豆精东视频| 国产高清视频一区| 日本强好片久久久久久aaa| 亚洲激情五月婷婷| 中文字幕日韩精品一区| 久久伊人蜜桃av一区二区| 欧美一区二区三区在线观看视频| 一本一道久久a久久精品| 成人性生交大片免费看中文| 国产精品原创巨作av| 久草在线在线精品观看| 日本中文字幕一区| 亚洲chinese男男1069| 一区二区三区在线观看视频| 中文字幕一区二区三中文字幕| 国产午夜亚洲精品不卡| 久久亚洲综合色一区二区三区| 欧美一区二区美女| 欧美精品久久一区| 欧美日本国产一区| 欧美性猛交一区二区三区精品|