2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CZIPINPUTSTREAM
|
|
|
|
#define _CZIPINPUTSTREAM
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "Kyoto/Streams/CInputStream.hpp"
|
|
|
|
|
|
|
|
#include "rstl/auto_ptr.hpp"
|
2022-10-13 06:09:15 +00:00
|
|
|
#include "rstl/single_ptr.hpp"
|
|
|
|
|
|
|
|
#include "zlib/zlib.h"
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
class CZipInputStream : public CInputStream {
|
|
|
|
public:
|
|
|
|
CZipInputStream(rstl::auto_ptr< CInputStream > in);
|
|
|
|
~CZipInputStream() override;
|
2022-10-13 06:09:15 +00:00
|
|
|
size_t Read(void* dest, size_t len) override;
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
private:
|
2022-10-13 06:09:15 +00:00
|
|
|
rstl::single_ptr<uchar> mCompBuf;
|
|
|
|
rstl::auto_ptr< CInputStream > mStream;
|
|
|
|
rstl::single_ptr<z_stream_s> mZStream;
|
2022-09-13 04:26:54 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CZIPINPUTSTREAM
|