/* */ #ifndef D_GZIP_DECODER_H #define D_GZIP_DECODER_H #include "common.h" #include #include #include "a2functional.h" namespace aria2 { // GZipDecoder can decode both gzip and deflate format. class GZipDecoder { private: z_stream* strm_; bool finished_; static const size_t OUTBUF_LENGTH = 16_k; static const std::string NAME; public: GZipDecoder(); ~GZipDecoder(); void init(); std::string decode(const unsigned char* inbuf, size_t inlen); bool finished(); void release(); const std::string& getName() const; }; } // namespace aria2 #endif // D_GZIP_DECODER_H