Skip to content

πŸ—ƒοΈ A C++ library for work with mime-types

License

Notifications You must be signed in to change notification settings

Soundux/pantomime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0e2b6dd Β· Jun 3, 2023

History

8 Commits
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022
Jun 3, 2023
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022
Oct 5, 2022

Repository files navigation



πŸ“‹ About

Pantomime is a simple to use, zero-dependency, straight-forward, C++17 library for work with mime-types.

πŸ“¦ Installation

  • With FetchContent
    include(FetchContent)
    
    FetchContent_Declare(pantomime GIT_REPOSITORY "https://github.com/Soundux/pantomime")
    FetchContent_MakeAvailable(pantomime)
    
    target_link_libraries(<target> soundux::pantomime)
  • As Git-Submodule
    $ git submodule add https://github.com/Soundux/pantomime
    add_subdirectory(pantomime)
    target_link_libraries(<target> soundux::pantomime)

πŸš€ Simple Example

auto mime = pantomime::mime::from("test.mp4").value(); // or pantomime::mime::get("video/mp4");

assert(mime.type == "video");
assert(mime.sub_type == "mp4");
assert(mime.extensions.count("mp4"));
assert(mime.compressible.value() == false);

Pantomime is based on mime-db
Our logo was generated by DALL-E