32 lines
754 B
C++
32 lines
754 B
C++
#pragma once
|
|
|
|
#include "zip/zip.h"
|
|
#include <string>
|
|
#include <iostream>
|
|
#include "ofMain.h"
|
|
|
|
namespace VariableEditor {
|
|
class Zip {
|
|
public:
|
|
Zip(const std::string & filename = "lol.zip");
|
|
~Zip();
|
|
//void open(const std::string & filename);
|
|
void addFile(const std::string & filename);
|
|
void addBuffer(std::string filename, char * inbuf, size_t inbufsize);
|
|
void getOutputBuffer(char * * outbuf, size_t & outbufsize);
|
|
void close();
|
|
private:
|
|
struct zip_t * zip;
|
|
bool closed = false;
|
|
};
|
|
|
|
class UnZip {
|
|
public:
|
|
UnZip(const std::string & filename, const std::string & outdir);
|
|
~UnZip();
|
|
private:
|
|
struct zip_t * zip;
|
|
bool closed = false;
|
|
};
|
|
|
|
}
|