diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-03-26 11:28:58 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-03-26 12:19:02 +0200 |
commit | 746bcd25e22e492cd45a92bc9addb04cf81d208b (patch) | |
tree | 3244166092e839b0c19539742ec9377bac6e3517 /lib/embed.h | |
download | rcc-746bcd25e22e492cd45a92bc9addb04cf81d208b.tar.xz |
Initial commit
Diffstat (limited to 'lib/embed.h')
-rw-r--r-- | lib/embed.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/embed.h b/lib/embed.h new file mode 100644 index 0000000..566b14c --- /dev/null +++ b/lib/embed.h @@ -0,0 +1,34 @@ +#pragma once + +#include <span> +#include <string> +#include <unordered_map> +#include <frozen/unordered_map.h> +#include <frozen/string.h> + +namespace embed { + +enum Compression { + None, + Zstd +}; + +struct ResourceData { + Compression compression = None; + std::span<const unsigned char> dictionary; +}; + +class Resources { +public: + explicit Resources(const ResourceData &info); + ~Resources(); + + [[nodiscard]] + std::span<unsigned char> decompress(const std::span<const unsigned char> &entry); + +private: + const ResourceData m_info; +}; // class + +} + |