/* * This file is part of VoidArchiveTool. * * Copyright (C) 2025 Yanczi * * Void Archive Toolis free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #pragma once #include #include namespace ui { inline constexpr std::string_view title = "exPak"; inline constexpr std::string_view ver = "0.5"; } // Pliki namespace fl { inline constexpr std::string_view sigpak = "XPAK"; inline constexpr std::string_view sigkey = "XKEY"; inline constexpr std::string_view extpak = "pak"; inline constexpr std::string_view extkey = "key"; } // Size namespace ds { // Chunki streamowania inline constexpr uint32_t chunk_stream = 268435456; // 256MB // Blok chunków inline constexpr uint32_t block_size = 131072; // 128KB // Maksymalny rozmiar pliku do spakowania inline constexpr uint64_t maxFileSize = 8589934592; // 8GB } // Flagi namespace flag { inline constexpr uint8_t raw = 0x00; // Surowy plik inline constexpr uint8_t zip = 0x0F; // Kompresja inline constexpr uint8_t enc = 0xF0; // Szyfrowanie inline constexpr uint8_t ezd = 0xFF; // Kompresja z szyfrowaniem // Flaga do aktywacji filtra zdefiniowanego w json inline constexpr uint8_t filter = 0xAB; } struct CargoHead { std::string signature; uint8_t version; uint64_t table; uint32_t files; }; struct FilesTable { uint8_t nameLen; std::string nameFile; uint64_t offset; uint64_t size; uint64_t crc; uint8_t flag; };