// // Created by selim on 27.11.22. // #ifndef UNFLUTTER_SNAPSHOT_H #define UNFLUTTER_SNAPSHOT_H #include #include #include #include namespace Dart { class Snapshot { public: enum class Kind: uint64_t { FULL, FULL_JIT, FULL_AOT, MESSAGE, NONE, INVALID }; static const uint32_t MAGIC = 0xDCDCF5F5; private: uint32_t _magic; uint64_t _size; Kind _kind; std::string _versionHash; std::vector _features; public: explicit Snapshot(const std::byte* data); [[nodiscard]] uint64_t size() const; [[nodiscard]] std::string kindString() const; [[nodiscard]] std::string versionHash() const; [[nodiscard]] std::string featuresString() const; }; } #endif //UNFLUTTER_SNAPSHOT_H