#pragma once
#include <whiteout/common_types.h>
#include "codecs/compression.h"
#include "file_data.h"
#include "special_files.h"
#include "tables/block_table.h"
#include "tables/hash_table.h"
#include "tables/header.h"
#include <span>
#include <string>
#include <vector>
namespace whiteout::interfaces {
class WorkerPool;
}
namespace whiteout::storages::mpq {
struct WriteEntry {
std::string filename;
u16 locale = 0;
std::vector<u8> rawData;
CompressionFlag compression = CompressionFlag::kZlib;
bool encrypt = false;
bool singleUnit = false;
std::span<const u8> rawSectors;
BlockEntry sourceBlock{}; };
[[nodiscard]] std::vector<u8> writeArchive(const MpqHeader& header,
const std::vector<WriteEntry>& entries,
u32 hashTableCapacity,
interfaces::WorkerPool* pool = nullptr);
}