|
wavelength 1.0.0
|
Reader of a version 2 archive, the gen/main.ark of Amplitude and of its P.O.D. More...
#include <arkreader.h>
Public Member Functions | |
| const std::vector< ArkEntry > & | entries () const |
| List the files in record order. | |
| std::optional< ArkEntry > | locate (std::string_view path) const |
| Find a file the way Archive::GetFileInfo does, through the name hash table. | |
| std::expected< std::vector< std::uint8_t >, Error > | read (const ArkEntry &entry) |
| Read the bytes of a file. | |
| std::expected< void, Error > | extract (const std::filesystem::path &root) |
| Copy every file into a directory, at its path below the directory. | |
Static Public Member Functions | |
| static std::expected< ArkReader, Error > | open (const std::filesystem::path &path, std::uint64_t base=0) |
| Open an archive and read its directory. | |
Static Public Attributes | |
| static constexpr std::uint32_t | kVersion = 2 |
| The archive version the game reads. | |
Reader of a version 2 archive, the gen/main.ark of Amplitude and of its P.O.D.
demo.
The archive opens with the version, the file records, the string block of the names, and the name hash table, and the file data follows. A record identifies its name and its directory by their hash table slots.
|
static |
Open an archive and read its directory.
| path | The archive, or a disc image that stores it. |
| base | Offset of the archive in the file, for an archive inside a disc image. |
|
nodiscard |
List the files in record order.
|
nodiscard |
Find a file the way Archive::GetFileInfo does, through the name hash table.
| path | Path of the file. |
| std::expected< std::vector< std::uint8_t >, Error > Tools::Ark::ArkReader::read | ( | const ArkEntry & | entry | ) |
Read the bytes of a file.
| entry | The file. |
| std::expected< void, Error > Tools::Ark::ArkReader::extract | ( | const std::filesystem::path & | root | ) |
Copy every file into a directory, at its path below the directory.
| root | Destination directory. It is created when missing. |
|
staticconstexpr |
The archive version the game reads.