Source

pyGAP / game / engine / codec / zip.h

#ifdef COMPRESSION_ZLIB

#ifndef __CODEC_ZIP_H__
#define __CODEC_ZIP_H__


struct z_stream_s;
typedef struct z_stream_s   z_stream;

namespace codec {

class Base;
Base* create();


class Zip : public Base {
    friend Base* create();

protected:
    Zip();

public:
    virtual ~Zip();

    virtual bool has_error();

    virtual bool init(uint8_t* output);
    virtual bool finish();

    virtual bool decode(uint8_t* output, uint32_t output_size, uint8_t* input,  uint32_t input_size);

private:
    Zip(const Zip&);
    Zip operator=(const Zip&);

    z_stream*   stream_;
};


} /* namespace codec */


#endif
#endif