1
0
mirror of synced 2024-12-14 00:32:52 +01:00
ImHex/lib/libimhex/include/hex/helpers/magic.hpp

26 lines
566 B
C++
Raw Normal View History

2021-09-06 16:15:05 +02:00
#pragma once
#include <hex.hpp>
#include <hex/helpers/literals.hpp>
#include <string>
#include <vector>
namespace hex::prv {
class Provider;
}
2021-09-06 16:15:05 +02:00
namespace hex::magic {
using namespace hex::literals;
bool compile();
std::string getDescription(const std::vector<u8> &data);
std::string getDescription(prv::Provider *provider, size_t size = 100_KiB);
2021-09-06 16:15:05 +02:00
std::string getMIMEType(const std::vector<u8> &data);
std::string getMIMEType(prv::Provider *provider, size_t size = 100_KiB);
2021-09-06 16:15:05 +02:00
bool isValidMIMEType(const std::string &mimeType);
2021-09-06 16:15:05 +02:00
}