variabletime/src/Zip.h

33 lines
754 B
C
Raw Normal View History

2023-09-24 18:39:52 +02:00
#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;
};
}