3 #ifndef SPECTMORPH_ZIP_HH
4 #define SPECTMORPH_ZIP_HH
16 void *reader =
nullptr;
17 bool need_close =
false;
19 void *read_mem_stream =
nullptr;
20 std::vector<uint8_t> m_data;
23 ZipReader (
const std::vector<uint8_t>& data);
26 std::vector<std::string> filenames();
28 std::vector<uint8_t> read (
const std::string& name);
30 static bool is_zip (
const std::string& name);
35 void *writer =
nullptr;
36 bool need_close =
false;
38 void *write_mem_stream =
nullptr;
40 enum class Compress { STORE = 0, DEFLATE };
45 void add (
const std::string& filename,
const std::vector<uint8_t>& data, Compress compress = Compress::DEFLATE);
46 void add (
const std::string& filename,
const std::string& text, Compress compress = Compress::DEFLATE);
50 std::vector<uint8_t> data();
Definition: smutils.hh:102