VoidArchive/DataStruct.h

67 lines
No EOL
1.6 KiB
C++

/*
* 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 <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <cstdint>
#include <string>
#define EXTENSION "pak"
#define SIGNATURE "XPAK"
#define SIGNATURE_KEY_FILE 1497713496 // XKEY
#define VERSION 100
//Prgoram title
#define PROGRAM_TITLE "eXtendet PAK"
#define PROGRAM_VERSION "v1.1"
#define PROGRAM_AUTHOR "Yanczi"
#define PROGRAM_COMPILING "24 October 2025"
#define PROGRAM_LICENSE "GNU LGPL v3"
//Limity
#define MAX_FILE_SIZE 2147483648 // 2GB
#define MAX_PAK_SIZE 8796093022208 // 8TB
// Metody zapisania pliku
#define RAW_FILE 0
#define ZIP_FILE 1
#define CRYPT_FILE 2
#define CRYPT_ZIP 3
struct CargoHead
{
std::string signature;
uint16_t version;
uint32_t files;
uint64_t table;
};
struct FilesTable
{
uint8_t nameLen;
std::string nameFile;
uint64_t hashName;
uint64_t offset;
uint32_t size;
uint64_t crc;
uint8_t isZip;
};