support big-endian GSL archives

This commit is contained in:
Martin Michelsen
2022-12-29 15:02:29 -08:00
parent 52db9008a8
commit 68abac4fd4
3 changed files with 24 additions and 13 deletions
+4 -1
View File
@@ -12,7 +12,7 @@
class GSLArchive {
public:
GSLArchive(std::shared_ptr<const std::string> data);
GSLArchive(std::shared_ptr<const std::string> data, bool big_endian);
~GSLArchive() = default;
struct Entry {
@@ -26,6 +26,9 @@ public:
StringReader get_reader(const std::string& name) const;
private:
template <typename LongT>
void load_t();
std::shared_ptr<const std::string> data;
std::unordered_map<std::string, Entry> entries;