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

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

?? fitblk.c

?? minix操作系統最新版本(3.1.1)的源代碼
?? 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久久久国产精品潘金 | 狠狠色狠狠色综合日日91app| 欧美精选一区二区| 欧美一区二区三区影视| 国产亚洲人成网站| 亚洲免费观看在线视频| 免费人成精品欧美精品| 国产91露脸合集magnet| 欧美视频一区二区三区四区| 欧美xfplay| 性做久久久久久免费观看| 黑人巨大精品欧美黑白配亚洲| 91在线观看美女| 日韩情涩欧美日韩视频| 亚洲另类色综合网站| 国产精品影音先锋| 日韩精品中午字幕| 天天色 色综合| 欧美日韩精品一区二区天天拍小说 | 4438成人网| 亚洲电影你懂得| 欧美性受xxxx黑人xyx| 中文字幕亚洲综合久久菠萝蜜| 精品中文字幕一区二区小辣椒| 欧美日韩一卡二卡| 日韩专区在线视频| 日韩欧美你懂的| 国产99久久久国产精品免费看| 26uuu久久天堂性欧美| 国产伦精品一区二区三区免费| 日韩精品一区二区三区swag| 日韩av不卡在线观看| 欧美精品色综合| 韩国v欧美v日本v亚洲v| 久久久国产精华| 一本一道波多野结衣一区二区| 亚洲美女视频在线| 制服丝袜激情欧洲亚洲| 国产永久精品大片wwwapp| 亚洲国产精品黑人久久久| 欧美在线影院一区二区| 精品一区二区三区视频在线观看 | 久久久www成人免费毛片麻豆| 成人av在线资源网站| 夜夜亚洲天天久久| 久久综合色播五月| 欧美少妇xxx| 9色porny自拍视频一区二区| 亚洲综合视频在线| 国产精品久久久久影院亚瑟| 欧美精品免费视频| 91蜜桃网址入口| 国产精品一区二区久激情瑜伽| 亚洲日本在线天堂| 国产精品毛片久久久久久| 日韩欧美你懂的| 91精品国产综合久久婷婷香蕉| 国产成人午夜片在线观看高清观看| 亚洲欧美日韩中文字幕一区二区三区 | 欧美视频完全免费看| 高清国产一区二区三区| 国产高清亚洲一区| 国产在线精品不卡| 麻豆精品视频在线观看视频| 视频一区中文字幕| 麻豆久久一区二区| 国模一区二区三区白浆| 国产精品一二一区| 福利电影一区二区| 91在线播放网址| 欧美日韩你懂的| 欧美一区二区三区小说| 日韩欧美国产高清| 国产午夜精品福利| 1000精品久久久久久久久| 国产精品久久久久久一区二区三区| 久久久精品免费免费| 亚洲欧美日韩一区二区三区在线观看| 日韩伦理免费电影| 青娱乐精品在线视频| 国产91精品露脸国语对白| 91麻豆自制传媒国产之光| 在线欧美日韩国产| 久久久综合视频| 亚洲成人激情社区| www.日韩在线| 精品国产乱码久久久久久蜜臀| 久久久www免费人成精品| 午夜精品一区在线观看| 国产**成人网毛片九色| 538在线一区二区精品国产| 国产精品日日摸夜夜摸av| 蜜桃传媒麻豆第一区在线观看| 色94色欧美sute亚洲线路二| 精品国产青草久久久久福利| 亚洲美女视频在线观看| 福利一区二区在线| 国产日韩欧美精品一区| 国产视频一区二区三区在线观看| 激情久久久久久久久久久久久久久久| 欧美精品视频www在线观看| 亚洲老司机在线| 亚洲小少妇裸体bbw| 成人精品电影在线观看| 久久精品视频在线看| 日日摸夜夜添夜夜添精品视频| 色婷婷精品久久二区二区蜜臂av | 国产无遮挡一区二区三区毛片日本| 亚洲国产欧美在线| 欧美精品视频www在线观看| 日本成人在线网站| 捆绑调教美女网站视频一区| 在线精品视频免费观看| 怡红院av一区二区三区| 91麻豆精品国产91久久久资源速度| 国产精品伦一区| 天天射综合影视| 国产亚洲成aⅴ人片在线观看| 国产福利一区在线| 中文字幕一区二区三区四区不卡 | 欧美一区二区三区思思人 | 国产久卡久卡久卡久卡视频精品| 国产午夜精品久久久久久免费视| 午夜成人免费视频| 欧美国产亚洲另类动漫| 欧美午夜影院一区| 成人v精品蜜桃久久一区| 婷婷久久综合九色国产成人| 国产亚洲一区二区三区在线观看 | 色久优优欧美色久优优| 韩国三级电影一区二区| 亚洲国产综合视频在线观看| 欧美精品一区二区三区蜜桃| 日韩欧美一区在线| 国产酒店精品激情| 看电视剧不卡顿的网站| 丝袜a∨在线一区二区三区不卡| 久久综合九色综合97_久久久| 欧美日韩一区二区欧美激情| 99r国产精品| 成人av网站在线观看| 国产成人夜色高潮福利影视| 九九在线精品视频| 韩国成人精品a∨在线观看| 日韩av电影免费观看高清完整版 | 亚洲第一电影网| 亚洲欧美韩国综合色| 亚洲精品高清在线| 一区二区三区色| 天天色天天爱天天射综合| 亚洲图片欧美色图| 男男gaygay亚洲| 老司机午夜精品99久久| 国产精品1区2区| 不卡视频免费播放| 欧美午夜电影一区| 精品久久人人做人人爱| 欧美高清在线一区| 亚洲一区二区四区蜜桃| 美女www一区二区| 99久久久国产精品免费蜜臀| 91国在线观看| 欧美变态凌虐bdsm| 亚洲一区二区五区| 狠狠v欧美v日韩v亚洲ⅴ| av高清不卡在线| 欧美一区二区三区日韩| 久久综合久久综合久久综合| 夜夜嗨av一区二区三区中文字幕 | 亚洲精品五月天| 久久成人免费网| 91精品国产欧美日韩| 夜夜亚洲天天久久| 成人h动漫精品一区二区| 精品99久久久久久| 青青草91视频| 欧美久久一二三四区| 一区二区在线电影| 91免费版在线| 亚洲自拍偷拍网站| 在线观看亚洲精品| 亚洲一二三四在线| 国内精品伊人久久久久影院对白| 欧美日韩一本到| 日韩福利视频网| 欧美一区二区三区不卡| 麻豆国产欧美日韩综合精品二区| 欧美色视频一区| 麻豆精品精品国产自在97香蕉| 欧美高清视频一二三区| 国产无人区一区二区三区| 国产三区在线成人av| 国产一区欧美二区| 亚洲精品国产a| 日韩精品一区二区三区中文不卡| 久久99精品久久久久久国产越南 |