-
Notifications
You must be signed in to change notification settings - Fork 3
ZAR
The Zipper Archive - or ZAR format - is a format developed by Zipper Interactive that embodies a folder-like hierarchy. The format has its origins dating all the way back to the late 1990's, making its first appearance in Top Gun Hornet's Nest.
An archive is split into multiple keys. Each key is just an abstraction for arbitrary data. Keys are effectively signposts that tell you what the key is, how big it is, and how to get there.
In later versions, sub-directories are introduced.
To access the contents of a ZAR/ZDB archive, you have to open it first.
zar::CZAR archive;
const char* path_to_zar = "C:/SOCOM Directory/RUN/myzar.zar";
if (archive.Open(path_to_zar, 0, 1, 16))
{
std::cout << "Open success!" << std::endl;
}
else
{
std::cout << "Open failure!" << std::endl;
}Data inside of a ZAR file are broken up into keys. Keys are effectively signposts that tell you:
- What the data is
- How big the data is
- Where the data is located
To find a key, you have to know the keys name. To open a key, do as follows:
zar::CKey* key = archive.OpenKey("my_key");
if (key)
{
std::cout << "Key open success!" << std::endl;
archive.CloseKey(key); // Don't forget to close your key to free resources!
}
else
{
std::cout << "Key open failure!" << std::endl;
}In the future, I plan to have some sort of website or whatnot to let you see the names of the keys inside of an archive.