#pragma once #include #include #include #include namespace hex::prv { class Provider; } namespace hex::magic { using namespace hex::literals; bool compile(); std::string getDescription(const std::vector &data, bool firstEntryOnly = false); std::string getDescription(prv::Provider *provider, size_t size = 100_KiB, bool firstEntryOnly = false); std::string getMIMEType(const std::vector &data, bool firstEntryOnly = false); std::string getMIMEType(prv::Provider *provider, size_t size = 100_KiB, bool firstEntryOnly = false); std::string getExtensions(const std::vector &data, bool firstEntryOnly = false); std::string getExtensions(prv::Provider *provider, size_t size = 100_KiB, bool firstEntryOnly = false); std::string getAppleCreatorType(const std::vector &data, bool firstEntryOnly = false); std::string getAppleCreatorType(prv::Provider *provider, size_t size = 100_KiB, bool firstEntryOnly = false); bool isValidMIMEType(const std::string &mimeType); }