bsa/tes4.hpp file

Namespaces

namespace bsa
namespace bsa::tes4
namespace bsa::tes4::hashing

Classes

struct bsa::tes4::hashing::hash
The underlying hash object used to uniquely identify objects within the archive.
class bsa::tes4::file
Represents a file within the TES4 virtual filesystem.
class bsa::tes4::directory
Represents a directory within the TES4 virtual filesystem.
class bsa::tes4::archive
Represents the TES4 revision of the bsa format.

Enums

enum class archive_flag: std::uint32_t { none = 0u, directory_strings = 1u << 0u, file_strings = 1u << 1u, compressed = 1u << 2u, retain_directory_names = 1u << 3u, retain_file_names = 1u << 4u, retain_file_name_offsets = 1 << 5u, xbox_archive = 1u << 6u, retain_strings_during_startup = 1u << 7u, embedded_file_names = 1u << 8u, xbox_compressed = 1u << 9u }
Archive flags can impact the layout of an archive, or how it is read.
enum class archive_type: std::uint16_t { none = 0u, meshes = 1u << 0u, textures = 1u << 1u, menus = 1u << 2u, sounds = 1u << 3u, voices = 1u << 4u, shaders = 1u << 5u, trees = 1u << 6u, fonts = 1u << 7u, misc = 1u << 8u }
Specifies file types contained within an archive.
enum class compression_codec { normal, xmem }
Specifies the codec to use when performing compression/decompression actions on files.
enum class version: std::uint32_t { tes4 = 103, fo3 = 104, fnv = 104, tes5 = 104, sse = 105 }
The archive version.

Functions

template<concepts::stringable String>
auto hash_directory(String&& a_path) -> hash noexcept
Produces a hash using the given path.
auto hash_directory_in_place(std::string& a_path) -> hash noexcept
Produces a hash using the given path.
template<concepts::stringable String>
auto hash_file(String&& a_path) -> hash noexcept
Produces a hash using the given path.
auto hash_file_in_place(std::string& a_path) -> hash noexcept
Produces a hash using the given path.