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

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

?? fitblk.c

?? 一個本地database引擎,支持中文T_Sql查詢,兼容DELPHI標準數據庫控件
?? C
字號:
/* fitblk.c: example of fitting compressed output to a specified size
   Not copyrighted -- provided to the public domain
   Version 1.1  25 November 2004  Mark Adler */

/* Version history:
   1.0  24 Nov 2004  First version
   1.1  25 Nov 2004  Change deflateInit2() to deflateInit()
                     Use fixed-size, stack-allocated raw buffers
                     Simplify code moving compression to subroutines
                     Use assert() for internal errors
                     Add detailed description of approach
 */

/* Approach to just fitting a requested compressed size:

   fitblk performs three compression passes on a portion of the input
   data in order to determine how much of that input will compress to
   nearly the requested output block size.  The first pass generates
   enough deflate blocks to produce output to fill the requested
   output size plus a specfied excess amount (see the EXCESS define
   below).  The last deflate block may go quite a bit past that, but
   is discarded.  The second pass decompresses and recompresses just
   the compressed data that fit in the requested plus excess sized
   buffer.  The deflate process is terminated after that amount of
   input, which is less than the amount consumed on the first pass.
   The last deflate block of the result will be of a comparable size
   to the final product, so that the header for that deflate block and
   the compression ratio for that block will be about the same as in
   the final product.  The third compression pass decompresses the
   result of the second step, but only the compressed data up to the
   requested size minus an amount to allow the compressed stream to
   complete (see the MARGIN define below).  That will result in a
   final compressed stream whose length is less than or equal to the
   requested size.  Assuming sufficient input and a requested size
   greater than a few hundred bytes, the shortfall will typically be
   less than ten bytes.

   If the input is short enough that the first compression completes
   before filling the requested output size, then that compressed
   stream is return with no recompression.

   EXCESS is chosen to be just greater than the shortfall seen in a
   two pass approach similar to the above.  That shortfall is due to
   the last deflate block compressing more efficiently with a smaller
   header on the second pass.  EXCESS is set to be large enough so
   that there is enough uncompressed data for the second pass to fill
   out the requested size, and small enough so that the final deflate
   block of the second pass will be close in size to the final deflate
   block of the third and final pass.  MARGIN is chosen to be just
   large enough to assure that the final compression has enough room
   to complete in all cases.
 */

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

#define local static

/* print nastygram and leave */
local void quit(char *why)
{
    fprintf(stderr, "fitblk abort: %s\n", why);
    exit(1);
}

#define RAWLEN 4096    /* intermediate uncompressed buffer size */

/* compress from file to def until provided buffer is full or end of
   input reached; return last deflate() return value, or Z_ERRNO if
   there was read error on the file */
local int partcompress(FILE *in, z_streamp def)
{
    int ret, flush;
    unsigned char raw[RAWLEN];

    flush = Z_NO_FLUSH;
    do {
        def->avail_in = fread(raw, 1, RAWLEN, in);
        if (ferror(in))
            return Z_ERRNO;
        def->next_in = raw;
        if (feof(in))
            flush = Z_FINISH;
        ret = deflate(def, flush);
        assert(ret != Z_STREAM_ERROR);
    } while (def->avail_out != 0 && flush == Z_NO_FLUSH);
    return ret;
}

/* recompress from inf's input to def's output; the input for inf and
   the output for def are set in those structures before calling;
   return last deflate() return value, or Z_MEM_ERROR if inflate()
   was not able to allocate enough memory when it needed to */
local int recompress(z_streamp inf, z_streamp def)
{
    int ret, flush;
    unsigned char raw[RAWLEN];

    flush = Z_NO_FLUSH;
    do {
        /* decompress */
        inf->avail_out = RAWLEN;
        inf->next_out = raw;
        ret = inflate(inf, Z_NO_FLUSH);
        assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR &&
               ret != Z_NEED_DICT);
        if (ret == Z_MEM_ERROR)
            return ret;

        /* compress what was decompresed until done or no room */
        def->avail_in = RAWLEN - inf->avail_out;
        def->next_in = raw;
        if (inf->avail_out != 0)
            flush = Z_FINISH;
        ret = deflate(def, flush);
        assert(ret != Z_STREAM_ERROR);
    } while (ret != Z_STREAM_END && def->avail_out != 0);
    return ret;
}

#define EXCESS 256      /* empirically determined stream overage */
#define MARGIN 8        /* amount to back off for completion */

/* compress from stdin to fixed-size block on stdout */
int main(int argc, char **argv)
{
    int ret;                /* return code */
    unsigned size;          /* requested fixed output block size */
    unsigned have;          /* bytes written by deflate() call */
    unsigned char *blk;     /* intermediate and final stream */
    unsigned char *tmp;     /* close to desired size stream */
    z_stream def, inf;      /* zlib deflate and inflate states */

    /* get requested output size */
    if (argc != 2)
        quit("need one argument: size of output block");
    ret = strtol(argv[1], argv + 1, 10);
    if (argv[1][0] != 0)
        quit("argument must be a number");
    if (ret < 8)            /* 8 is minimum zlib stream size */
        quit("need positive size of 8 or greater");
    size = (unsigned)ret;

    /* allocate memory for buffers and compression engine */
    blk = malloc(size + EXCESS);
    def.zalloc = Z_NULL;
    def.zfree = Z_NULL;
    def.opaque = Z_NULL;
    ret = deflateInit(&def, Z_DEFAULT_COMPRESSION);
    if (ret != Z_OK || blk == NULL)
        quit("out of memory");

    /* compress from stdin until output full, or no more input */
    def.avail_out = size + EXCESS;
    def.next_out = blk;
    ret = partcompress(stdin, &def);
    if (ret == Z_ERRNO)
        quit("error reading input");

    /* if it all fit, then size was undersubscribed -- done! */
    if (ret == Z_STREAM_END && def.avail_out >= EXCESS) {
        /* write block to stdout */
        have = size + EXCESS - def.avail_out;
        if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
            quit("error writing output");

        /* clean up and print results to stderr */
        ret = deflateEnd(&def);
        assert(ret != Z_STREAM_ERROR);
        free(blk);
        fprintf(stderr,
                "%u bytes unused out of %u requested (all input)\n",
                size - have, size);
        return 0;
    }

    /* it didn't all fit -- set up for recompression */
    inf.zalloc = Z_NULL;
    inf.zfree = Z_NULL;
    inf.opaque = Z_NULL;
    inf.avail_in = 0;
    inf.next_in = Z_NULL;
    ret = inflateInit(&inf);
    tmp = malloc(size + EXCESS);
    if (ret != Z_OK || tmp == NULL)
        quit("out of memory");
    ret = deflateReset(&def);
    assert(ret != Z_STREAM_ERROR);

    /* do first recompression close to the right amount */
    inf.avail_in = size + EXCESS;
    inf.next_in = blk;
    def.avail_out = size + EXCESS;
    def.next_out = tmp;
    ret = recompress(&inf, &def);
    if (ret == Z_MEM_ERROR)
        quit("out of memory");

    /* set up for next reocmpression */
    ret = inflateReset(&inf);
    assert(ret != Z_STREAM_ERROR);
    ret = deflateReset(&def);
    assert(ret != Z_STREAM_ERROR);

    /* do second and final recompression (third compression) */
    inf.avail_in = size - MARGIN;   /* assure stream will complete */
    inf.next_in = tmp;
    def.avail_out = size;
    def.next_out = blk;
    ret = recompress(&inf, &def);
    if (ret == Z_MEM_ERROR)
        quit("out of memory");
    assert(ret == Z_STREAM_END);    /* otherwise MARGIN too small */

    /* done -- write block to stdout */
    have = size - def.avail_out;
    if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
        quit("error writing output");

    /* clean up and print results to stderr */
    free(tmp);
    ret = inflateEnd(&inf);
    assert(ret != Z_STREAM_ERROR);
    ret = deflateEnd(&def);
    assert(ret != Z_STREAM_ERROR);
    free(blk);
    fprintf(stderr,
            "%u bytes unused out of %u requested (%lu input)\n",
            size - have, size, def.total_in);
    return 0;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线免费播放| 午夜视频久久久久久| 99国产精品久久| 国产精品1区二区.| 大桥未久av一区二区三区中文| 久久国产福利国产秒拍| 久久99国产精品久久99| 久88久久88久久久| 久久97超碰色| av激情综合网| 欧美乱妇15p| 亚洲va天堂va国产va久| 丝袜a∨在线一区二区三区不卡| 五月婷婷另类国产| 国产一区三区三区| 色综合色狠狠综合色| 精品视频在线看| 久久久综合视频| 五月天婷婷综合| 高清免费成人av| jizz一区二区| 91久久精品一区二区三区| 精品乱人伦小说| 亚洲大型综合色站| av毛片久久久久**hd| 91精品国产91久久久久久最新毛片 | 亚洲国产激情av| 美女网站一区二区| 3d成人h动漫网站入口| 亚洲欧美怡红院| 蜜桃视频免费观看一区| 欧美午夜视频网站| 一区二区三区在线视频观看| 成人av电影在线网| 懂色一区二区三区免费观看| 在线不卡一区二区| 黄页网站大全一区二区| 欧美日韩国产区一| 亚洲动漫第一页| 色综合 综合色| 一区二区三区 在线观看视频| 94-欧美-setu| 亚洲激情校园春色| 色菇凉天天综合网| 亚洲国产精品一区二区www在线 | 国产精品久久久久久亚洲毛片 | 国产在线精品国自产拍免费| 精品国产乱码久久久久久免费 | 97久久精品人人澡人人爽| 国产精品高清亚洲| 欧美日韩在线三级| 六月丁香综合在线视频| 久久青草欧美一区二区三区| 国产精品1024久久| 久久久不卡影院| 99久久久精品| 免费人成精品欧美精品| 久久久精品日韩欧美| 日本韩国一区二区| 日本欧美加勒比视频| 日韩欧美黄色影院| 91麻豆精品在线观看| 亚洲精品国产品国语在线app| 欧美日韩免费一区二区三区视频 | 精品一区二区三区在线观看国产| 国产精品天天看| 欧美一级电影网站| 色婷婷香蕉在线一区二区| 亚洲成人免费在线观看| 欧美国产一区在线| 91精品国产综合久久小美女| 91在线码无精品| 国产一区二区在线看| 亚洲成人综合网站| 26uuu久久综合| 911精品国产一区二区在线| 成人午夜大片免费观看| 成人av电影在线| 色噜噜偷拍精品综合在线| 国产成人精品www牛牛影视| 国产久卡久卡久卡久卡视频精品| 久久91精品国产91久久小草| 久久精品国产99国产| 精品无人码麻豆乱码1区2区| 国产精品性做久久久久久| 国产**成人网毛片九色| 91麻豆免费在线观看| 欧美综合久久久| 日韩视频免费观看高清完整版 | 97久久精品人人做人人爽 | 亚洲另类在线一区| 蜜桃av噜噜一区二区三区小说| 激情文学综合插| 色婷婷亚洲一区二区三区| 在线不卡欧美精品一区二区三区| 日韩一二三四区| 亚洲蜜臀av乱码久久精品蜜桃| 日韩成人精品在线| 91性感美女视频| 精品99一区二区三区| 亚洲在线成人精品| 男男视频亚洲欧美| 91在线免费播放| 久久久久久免费| 婷婷中文字幕一区三区| 国产69精品久久久久毛片| 91精品国产91久久久久久一区二区| 国产精品国产三级国产aⅴ原创| 看片网站欧美日韩| 欧美亚洲一区二区在线观看| 欧美激情综合在线| 国产另类ts人妖一区二区| 欧美一区二区三区免费视频| 亚洲综合成人在线| 欧洲人成人精品| 一区二区在线观看av| av电影在线观看不卡| 国产精品污污网站在线观看| 国产精品99久久久久久久vr | 亚洲一区在线播放| 欧美在线|欧美| 亚洲国产一区二区三区青草影视 | 成人欧美一区二区三区| 99久久99久久精品国产片果冻| 国产欧美一区二区精品婷婷| 狠狠色丁香久久婷婷综| 久久奇米777| 成人综合激情网| 亚洲欧美激情在线| 欧美日本一区二区| 日韩国产一二三区| 精品国产一区二区三区忘忧草| 久久99精品久久久久久| 国产亚洲福利社区一区| 99久久综合狠狠综合久久| 亚洲视频香蕉人妖| 91精品国产免费| 国产福利一区二区三区视频在线| 国产精品私人自拍| 欧美福利电影网| 成人精品一区二区三区四区| 一区二区免费在线| 久久综合999| 欧美日韩中文一区| 成人黄色av电影| 老司机精品视频线观看86| 国产精品嫩草99a| 日韩欧美国产综合| 91蝌蚪porny九色| 国产精品一区二区在线看| 亚洲色图制服丝袜| 久久久噜噜噜久久人人看| 欧美亚洲国产一区二区三区| 不卡一卡二卡三乱码免费网站| 亚洲欧美成人一区二区三区| 正在播放一区二区| 色综合中文字幕国产 | 日本va欧美va精品| 一区二区三区四区国产精品| 久久久久亚洲蜜桃| 久久亚洲综合色| 日韩你懂的在线观看| 欧美一区二区女人| 欧美精品三级日韩久久| 色综合色狠狠综合色| 91久久久免费一区二区| 色呦呦一区二区三区| 欧美午夜精品久久久久久孕妇| 色素色在线综合| 欧美日韩在线观看一区二区| 欧美日韩免费不卡视频一区二区三区 | 国产精品一区在线观看你懂的| 麻豆一区二区三| 成人性生交大片免费看中文网站| 免费观看在线色综合| 美女在线一区二区| 久久99精品久久久久久国产越南| 久久99国产精品久久99| 国产福利一区在线观看| 99久精品国产| 欧美日韩国产美| 久久男人中文字幕资源站| 中文字幕一区二区三区乱码在线| 亚洲欧洲另类国产综合| 亚洲国产精品视频| 国产一区二区电影| 日本高清成人免费播放| 精品国产区一区| 综合久久久久久久| 日韩极品在线观看| 成人黄色一级视频| 欧美成人伊人久久综合网| 成人免费观看av| 9191精品国产综合久久久久久 | 日韩欧美中文字幕制服| 国产目拍亚洲精品99久久精品| 青草国产精品久久久久久| 91小视频在线免费看| 中文字幕一区二区三区在线不卡| 免费高清成人在线|