2022-12-06 05:30:20 +00:00
|
|
|
#ifndef _CZIPOUTPUTSTREAM
|
|
|
|
#define _CZIPOUTPUTSTREAM
|
|
|
|
|
|
|
|
|
|
|
|
#include "Kyoto/Streams/COutputStream.hpp"
|
|
|
|
|
|
|
|
#include "rstl/auto_ptr.hpp"
|
|
|
|
|
|
|
|
#include "zlib/zlib.h"
|
|
|
|
|
|
|
|
class CZipOutputStream : public COutputStream {
|
|
|
|
public:
|
|
|
|
CZipOutputStream(COutputStream* out, int level);
|
|
|
|
~CZipOutputStream();
|
|
|
|
|
|
|
|
void Finish();
|
|
|
|
bool Process(bool v);
|
|
|
|
void Write(const void* ptr, size_t len);
|
2022-12-06 05:41:21 +00:00
|
|
|
|
|
|
|
int GetCompressedBytesWritten() { return mCompressedBytesWritten; }
|
2022-12-06 05:30:20 +00:00
|
|
|
private:
|
|
|
|
COutputStream* mOutput;
|
|
|
|
int mCompressedBytesWritten;
|
|
|
|
rstl::auto_ptr<z_stream> mZStream;
|
|
|
|
int mUnk;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _CZIPOUTPUTSTREAM
|