2021-09-06 16:15:05 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
|
|
|
#include <hex/helpers/literals.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2022-01-24 20:53:17 +01:00
|
|
|
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 = 5_MiB);
|
|
|
|
std::string getMIMEType(const std::vector<u8> &data);
|
|
|
|
std::string getMIMEType(prv::Provider *provider, size_t size = 5_MiB);
|
|
|
|
|
|
|
|
}
|