SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
XZP.h
Go to the documentation of this file.
1// ReSharper disable CppRedundantQualifier
2
3#pragma once
4
6
7#include "../PackFile.h"
8
9namespace vpkpp {
10
13constexpr std::string_view XZP_EXTENSION = ".xzp";
14
15class XZP : public PackFileReadOnly {
16public:
18 [[nodiscard]] static std::unique_ptr<PackFile> open(const std::string& path, const EntryCallback& callback = nullptr);
19
20 [[nodiscard]] std::optional<std::vector<std::byte>> readEntry(const std::string& path_) const override;
21
22 [[nodiscard]] Attribute getSupportedEntryAttributes() const override;
23
24protected:
26
27private:
29};
30
31} // namespace vpkpp
#define VPKPP_REGISTER_PACKFILE_OPEN(extension, function)
Definition PackFile.h:245
PackFileReadOnly(const std::string &fullFilePath_)
Definition PackFile.cpp:728
EntryCallbackBase< void > EntryCallback
Definition PackFile.h:38
Attribute getSupportedEntryAttributes() const override
Returns a list of supported entry attributes Mostly for GUI programs that show entries and their meta...
Definition XZP.cpp:155
static std::unique_ptr< PackFile > open(const std::string &path, const EntryCallback &callback=nullptr)
Open an XZP file.
Definition XZP.cpp:10
std::optional< std::vector< std::byte > > readEntry(const std::string &path_) const override
Try to read the entry's data to a bytebuffer.
Definition XZP.cpp:128
PackFileReadOnly(const std::string &fullFilePath_)
Definition PackFile.cpp:728
consteval uint32_t makeFourCC(const char fourCC[4])
Creates a FourCC identifier from a string of 4 characters.
Definition Binary.h:20
constexpr std::string_view XZP_EXTENSION
Definition XZP.h:13
Attribute
Definition Attribute.h:7
constexpr auto XZP_HEADER_SIGNATURE
Definition XZP.h:11
constexpr auto XZP_FOOTER_SIGNATURE
Definition XZP.h:12