#pragma once
#include <whiteout/common_types.h>
#include "../../common/hex.h"
#include <array>
#include <string>
namespace whiteout::storages::casc {
static constexpr u32 kArchiveEntryHeaderSize = 30;
static constexpr u8 kCKeySize = 16;
static constexpr u8 kEKeySize = 16;
static constexpr u8 kTvfsFormatVersion = 1;
static constexpr u8 kTvfsPathSeparator = 0x00;
static constexpr u8 kTvfsNodeValueMarker = 0xFF;
static constexpr u32 kTvfsFolderNodeBit = 0x80000000;
inline std::string configFilePath(const std::string& baseDir, const std::array<u8, 16>& key) {
auto hash = storages::common::hexEncode16(key);
return baseDir + "/config/" + hash.substr(0, 2) + "/" + hash.substr(2, 2) + "/" + hash;
}
}