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

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

?? zstream.h

?? 一款用來進行網絡模擬的軟件
?? H
字號:
/* * * Copyright (c) 1997 * Christian Michelsen Research AS * Advanced Computing * Fantoftvegen 38, 5036 BERGEN, Norway * http://www.cmr.no * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation.  Christian Michelsen Research AS makes no * representations about the suitability of this software for any * purpose.  It is provided "as is" without express or implied warranty. * */#ifndef ZSTREAM__H#define ZSTREAM__H/* * zstream.h - C++ interface to the 'zlib' general purpose compression library * $Id: zstream.h 1.1 1997-06-25 12:00:56+02 tyge Exp tyge $ */#include <strstream.h>#include <string.h>#include <stdio.h>#include "zlib.h"#if defined(_WIN32)#   include <fcntl.h>#   include <io.h>#   define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)#else#   define SET_BINARY_MODE(file)#endifclass zstringlen {public:    zstringlen(class izstream&);    zstringlen(class ozstream&, const char*);    size_t value() const { return val.word; }private:    struct Val { unsigned char byte; size_t word; } val;};//  ----------------------------- izstream -----------------------------class izstream{    public:        izstream() : m_fp(0) {}        izstream(FILE* fp) : m_fp(0) { open(fp); }        izstream(const char* name) : m_fp(0) { open(name); }        ~izstream() { close(); }        /* Opens a gzip (.gz) file for reading.         * open() can be used to read a file which is not in gzip format;         * in this case read() will directly read from the file without         * decompression. errno can be checked to distinguish two error         * cases (if errno is zero, the zlib error is Z_MEM_ERROR).         */        void open(const char* name) {            if (m_fp) close();            m_fp = ::gzopen(name, "rb");        }        void open(FILE* fp) {            SET_BINARY_MODE(fp);            if (m_fp) close();            m_fp = ::gzdopen(fileno(fp), "rb");        }        /* Flushes all pending input if necessary, closes the compressed file         * and deallocates all the (de)compression state. The return value is         * the zlib error number (see function error() below).         */        int close() {            int r = ::gzclose(m_fp);            m_fp = 0; return r;        }        /* Binary read the given number of bytes from the compressed file.         */        int read(void* buf, size_t len) {            return ::gzread(m_fp, buf, len);        }        /* Returns the error message for the last error which occurred on the         * given compressed file. errnum is set to zlib error number. If an         * error occurred in the file system and not in the compression library,         * errnum is set to Z_ERRNO and the application may consult errno         * to get the exact error code.         */        const char* error(int* errnum) {            return ::gzerror(m_fp, errnum);        }        gzFile fp() { return m_fp; }    private:        gzFile m_fp;};/* * Binary read the given (array of) object(s) from the compressed file. * If the input file was not in gzip format, read() copies the objects number * of bytes into the buffer. * returns the number of uncompressed bytes actually read * (0 for end of file, -1 for error). */template <class T, class Items>inline int read(izstream& zs, T* x, Items items) {    return ::gzread(zs.fp(), x, items*sizeof(T));}/* * Binary input with the '>' operator. */template <class T>inline izstream& operator>(izstream& zs, T& x) {    ::gzread(zs.fp(), &x, sizeof(T));    return zs;}inline zstringlen::zstringlen(izstream& zs) {    zs > val.byte;    if (val.byte == 255) zs > val.word;    else val.word = val.byte;}/* * Read length of string + the string with the '>' operator. */inline izstream& operator>(izstream& zs, char* x) {    zstringlen len(zs);    ::gzread(zs.fp(), x, len.value());    x[len.value()] = '\0';    return zs;}inline char* read_string(izstream& zs) {    zstringlen len(zs);    char* x = new char[len.value()+1];    ::gzread(zs.fp(), x, len.value());    x[len.value()] = '\0';    return x;}// ----------------------------- ozstream -----------------------------class ozstream{    public:        ozstream() : m_fp(0), m_os(0) {        }        ozstream(FILE* fp, int level = Z_DEFAULT_COMPRESSION)            : m_fp(0), m_os(0) {            open(fp, level);        }        ozstream(const char* name, int level = Z_DEFAULT_COMPRESSION)            : m_fp(0), m_os(0) {            open(name, level);        }        ~ozstream() {            close();        }        /* Opens a gzip (.gz) file for writing.         * The compression level parameter should be in 0..9         * errno can be checked to distinguish two error cases         * (if errno is zero, the zlib error is Z_MEM_ERROR).         */        void open(const char* name, int level = Z_DEFAULT_COMPRESSION) {            char mode[4] = "wb\0";            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;            if (m_fp) close();            m_fp = ::gzopen(name, mode);        }        /* open from a FILE pointer.         */        void open(FILE* fp, int level = Z_DEFAULT_COMPRESSION) {            SET_BINARY_MODE(fp);            char mode[4] = "wb\0";            if (level != Z_DEFAULT_COMPRESSION) mode[2] = '0'+level;            if (m_fp) close();            m_fp = ::gzdopen(fileno(fp), mode);        }        /* Flushes all pending output if necessary, closes the compressed file         * and deallocates all the (de)compression state. The return value is         * the zlib error number (see function error() below).         */        int close() {            if (m_os) {                ::gzwrite(m_fp, m_os->str(), m_os->pcount());                delete[] m_os->str(); delete m_os; m_os = 0;            }            int r = ::gzclose(m_fp); m_fp = 0; return r;        }        /* Binary write the given number of bytes into the compressed file.         */        int write(const void* buf, size_t len) {            return ::gzwrite(m_fp, (voidp) buf, len);        }        /* Flushes all pending output into the compressed file. The parameter         * _flush is as in the deflate() function. The return value is the zlib         * error number (see function gzerror below). flush() returns Z_OK if         * the flush_ parameter is Z_FINISH and all output could be flushed.         * flush() should be called only when strictly necessary because it can         * degrade compression.         */        int flush(int _flush) {            os_flush();            return ::gzflush(m_fp, _flush);        }        /* Returns the error message for the last error which occurred on the         * given compressed file. errnum is set to zlib error number. If an         * error occurred in the file system and not in the compression library,         * errnum is set to Z_ERRNO and the application may consult errno         * to get the exact error code.         */        const char* error(int* errnum) {            return ::gzerror(m_fp, errnum);        }        gzFile fp() { return m_fp; }        ostream& os() {            if (m_os == 0) m_os = new ostrstream;            return *m_os;        }        void os_flush() {            if (m_os && m_os->pcount()>0) {                ostrstream* oss = new ostrstream;                oss->fill(m_os->fill());                oss->flags(m_os->flags());                oss->precision(m_os->precision());                oss->width(m_os->width());                ::gzwrite(m_fp, m_os->str(), m_os->pcount());                delete[] m_os->str(); delete m_os; m_os = oss;            }        }    private:        gzFile m_fp;        ostrstream* m_os;};/* * Binary write the given (array of) object(s) into the compressed file. * returns the number of uncompressed bytes actually written * (0 in case of error). */template <class T, class Items>inline int write(ozstream& zs, const T* x, Items items) {    return ::gzwrite(zs.fp(), (voidp) x, items*sizeof(T));}/* * Binary output with the '<' operator. */template <class T>inline ozstream& operator<(ozstream& zs, const T& x) {    ::gzwrite(zs.fp(), (voidp) &x, sizeof(T));    return zs;}inline zstringlen::zstringlen(ozstream& zs, const char* x) {    val.byte = 255;  val.word = ::strlen(x);    if (val.word < 255) zs < (val.byte = val.word);    else zs < val;}/* * Write length of string + the string with the '<' operator. */inline ozstream& operator<(ozstream& zs, const char* x) {    zstringlen len(zs, x);    ::gzwrite(zs.fp(), (voidp) x, len.value());    return zs;}#ifdef _MSC_VERinline ozstream& operator<(ozstream& zs, char* const& x) {    return zs < (const char*) x;}#endif/* * Ascii write with the << operator; */template <class T>inline ostream& operator<<(ozstream& zs, const T& x) {    zs.os_flush();    return zs.os() << x;}#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品99久久久久久久女警| 美女一区二区视频| 日韩欧美一区二区久久婷婷| 欧亚一区二区三区| 欧美在线你懂得| 欧美午夜精品久久久久久孕妇| 91麻豆精东视频| 色狠狠av一区二区三区| 91在线精品一区二区三区| 97久久精品人人做人人爽| 一本大道综合伊人精品热热| 欧美α欧美αv大片| 日韩美女视频一区二区在线观看| 欧美猛男超大videosgay| 日韩一区二区三区电影在线观看 | 午夜av电影一区| 香港成人在线视频| 麻豆免费看一区二区三区| 狠狠网亚洲精品| eeuss国产一区二区三区| 色噜噜偷拍精品综合在线| 欧美片网站yy| 久久久久久**毛片大全| 1区2区3区国产精品| 天天综合色天天| 成人涩涩免费视频| 欧洲av一区二区嗯嗯嗯啊| 欧美tk—视频vk| 国产精品午夜春色av| 亚洲一区日韩精品中文字幕| 免费成人小视频| 97se亚洲国产综合自在线观| 欧美日韩精品一区二区在线播放| 日韩精品一区二区三区在线观看| 欧美激情一区二区三区不卡 | 中文字幕国产一区二区| 亚洲大片一区二区三区| 国产麻豆精品theporn| 色综合激情久久| 亚洲精品一区二区三区影院 | 欧美一区二区成人6969| 国产人成亚洲第一网站在线播放 | 欧美午夜精品一区二区三区| 精品国产精品网麻豆系列| 日韩一区欧美一区| 奇米影视一区二区三区| 91免费在线播放| 久久综合五月天婷婷伊人| 一区二区三区免费看视频| 一本久久a久久精品亚洲| 91精品国产色综合久久ai换脸| 中文子幕无线码一区tr| 免费观看久久久4p| 欧美久久一二区| 玉米视频成人免费看| 成人激情午夜影院| 精品国产一区二区三区忘忧草 | 日本成人在线网站| 91女神在线视频| 国产精品久久久久久久久动漫| 喷水一区二区三区| 欧美日韩精品一区二区天天拍小说| 国产精品天干天干在线综合| 久久99久久精品| 日韩一区二区电影网| 亚洲成av人片在线观看无码| 在线精品视频一区二区| 国产精品网站导航| 成人高清视频在线| 国产精品久久福利| 99久久er热在这里只有精品15| 久久综合999| 国产福利精品导航| 久久久亚洲高清| 处破女av一区二区| 国产精品美女久久久久久久| 成人动漫一区二区| 国产精品久久久久久一区二区三区| 国产精品亚洲综合一区在线观看| 2023国产精华国产精品| 国产一区二区导航在线播放| 久久午夜老司机| 国产精品一区二区在线看| 国产欧美精品在线观看| 国产成人精品午夜视频免费| 国产无一区二区| av不卡一区二区三区| 亚洲色图清纯唯美| 色国产精品一区在线观看| 亚洲成av人片一区二区| 欧美一级一区二区| 欧美日韩一区二区三区四区五区| 亚洲一区免费视频| 91精品国产综合久久香蕉的特点| 久久国产剧场电影| 国产日韩精品一区| 色婷婷av一区二区三区大白胸| 一区二区免费在线播放| 日韩午夜在线观看| 国产麻豆视频一区二区| 综合色天天鬼久久鬼色| 欧美怡红院视频| 精品一区二区三区欧美| 国产亚洲污的网站| 欧洲生活片亚洲生活在线观看| 日韩av一级电影| 亚洲国产高清在线| 欧美性色aⅴ视频一区日韩精品| 男女性色大片免费观看一区二区| 久久九九全国免费| 欧美日韩一区二区三区视频 | 国产精品丝袜一区| 欧美年轻男男videosbes| 国产成人av资源| 亚洲一区二区综合| 26uuu国产电影一区二区| 欧美亚日韩国产aⅴ精品中极品| 精品一区二区日韩| 亚洲一区在线免费观看| 欧美激情综合在线| 欧美xxxxx牲另类人与| 欧洲生活片亚洲生活在线观看| 国产在线不卡一卡二卡三卡四卡| 亚洲自拍偷拍av| 国产精品水嫩水嫩| 欧美大片一区二区三区| 欧美在线视频日韩| 成人av免费在线观看| 国产一区二区精品在线观看| 天天av天天翘天天综合网| 亚洲视频图片小说| 久久久久久久免费视频了| 日韩一区二区麻豆国产| 欧美三级视频在线| 色综合久久九月婷婷色综合| 国产精品一区一区三区| 精品在线观看视频| 视频一区二区国产| 五月婷婷综合网| 亚洲综合一区二区精品导航| 国产精品国产三级国产aⅴ入口 | 成人免费三级在线| 国产在线麻豆精品观看| 欧美aaaaaa午夜精品| 青青草精品视频| 偷拍与自拍一区| 亚洲国产精品综合小说图片区| 亚洲欧美一区二区久久| 中文字幕一区二区三区乱码在线| 久久久久99精品一区| 国产亚洲综合性久久久影院| 久久久久9999亚洲精品| 国产亚洲欧洲一区高清在线观看| 欧美不卡一区二区三区四区| 日韩视频一区二区三区在线播放 | 欧美一区二区视频在线观看| 欧美浪妇xxxx高跟鞋交| 欧美日本视频在线| 91精品国产一区二区| 日韩精品中文字幕一区二区三区| 日韩三级中文字幕| 欧美mv日韩mv亚洲| 久久久www成人免费毛片麻豆| 久久综合九色综合欧美亚洲| 国产欧美一区二区精品婷婷 | 亚洲国产综合91精品麻豆| 亚洲国产成人av| 日韩电影一二三区| 九九九精品视频| 成人精品鲁一区一区二区| 91丝袜美女网| 666欧美在线视频| 国产日韩欧美精品综合| 亚洲欧洲无码一区二区三区| 亚洲小少妇裸体bbw| 蜜桃视频在线观看一区| 国产精品一区二区在线看| 色综合久久综合网97色综合| 777a∨成人精品桃花网| 久久九九久久九九| 亚洲午夜免费福利视频| 久久99国产乱子伦精品免费| 成人一级片网址| 欧美色综合网站| 久久久久久久综合日本| 亚洲图片欧美色图| 国产在线精品一区二区不卡了| 成人av片在线观看| 欧美一区二区三区四区在线观看 | 日韩不卡手机在线v区| 国产精品1024久久| 欧美午夜精品免费| 久久久久久久久岛国免费| 亚洲一区二区三区中文字幕在线| 色久综合一二码| 26uuu欧美| 亚洲成人你懂的| 成人av电影在线观看| 欧美岛国在线观看| 亚洲va欧美va人人爽|