#pragma once #include #include #include namespace hex { class Tar { public: enum class Mode { Read, Write, Create }; Tar() = default; Tar(const std::fs::path &path, Mode mode); ~Tar(); std::vector read(const std::fs::path &path); void write(const std::fs::path &path, const std::vector &data); std::vector listEntries(); void extract(const std::fs::path &path, const std::fs::path &outputPath); void extractAll(const std::fs::path &outputPath); private: mtar_t m_ctx = { }; }; }