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