Qadmimes Snesnopic
Use this command to install Qadmimes:
winget install --id=Snesnopic.Qadmimes -e Simple utility to determine file types
winget install --id=Snesnopic.Qadmimes -e Simple utility to determine file types
Lightweight alternative to libmagic for MIME detection.
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
qadmimes
qadmimes --brief # Only output MIME types
#include
// detect from file path
std::string_view mime = qadmimes::MimeDetector::detect("example.png");
// detect from memory buffer
std::vector buffer = read_file_start("example.docx");
std::string_view mime = qadmimes::MimeDetector::detect(buffer);