#ifndef ARCHIVE_H #define ARCHIVE_H #include #include #include #include #include #include struct Header { uint8_t sig[2]; uint8_t version; // how many indexes we have. // uint32_t num_index; // uint32_t data_offset; }; #define ARCHIVE_PATH_MAX_LEN 100 struct Index { char path[ARCHIVE_PATH_MAX_LEN]; uint32_t size; }; class Archive { public: void add(const std::string& path, const std::vector& data); const std::map>& files() const; void read(const std::string& filename); void write(const std::string& filename); protected: void pack(sp::core::Buffer& buffer); protected: std::map> m_files; //std::vector m_idx; //std::vector m_data; }; #endif /* ARCHIVE_H */