{"id":26361279,"url":"https://github.com/agent-hellboy/cpp-filetype","last_synced_at":"2025-03-16T17:37:43.124Z","repository":{"id":282077844,"uuid":"947302777","full_name":"Agent-Hellboy/cpp-filetype","owner":"Agent-Hellboy","description":"A minimal cpp based filetype library ","archived":false,"fork":false,"pushed_at":"2025-03-12T16:56:42.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T17:40:08.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Agent-Hellboy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T13:28:51.000Z","updated_at":"2025-03-12T16:56:46.000Z","dependencies_parsed_at":"2025-03-12T17:50:17.413Z","dependency_job_id":null,"html_url":"https://github.com/Agent-Hellboy/cpp-filetype","commit_stats":null,"previous_names":["agent-hellboy/cpp-filetype"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fcpp-filetype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fcpp-filetype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fcpp-filetype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agent-Hellboy%2Fcpp-filetype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agent-Hellboy","download_url":"https://codeload.github.com/Agent-Hellboy/cpp-filetype/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243908837,"owners_count":20367477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-16T17:35:39.977Z","updated_at":"2025-03-16T17:37:43.119Z","avatar_url":"https://github.com/Agent-Hellboy.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpp-filetype\n\nA C++ library for detecting file types based on their magic bytes.\n\n## Installation\n\n### From Source\n\n1. Clone the repository:\n```bash\n$ git clone https://github.com/agent-hellboy/cpp-filetype.git\n```\n2. Build and install:\n```bash\n$ rm -rf build\n$ cd build\n$ cmake -DBUILD_TESTS=ON ..\n$ cmake --build .\n$ ctest --output-on-failure\n```\n\n\n## Usage\n\n```cpp\n#include \"filetype/filetype.hpp\"\n\nint main() {\n    std::vector\u003cuint8_t\u003e data = {0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A};\n    const ::filetype::Type* type = ::filetype::match(data);\n    if (type) {\n        std::cout \u003c\u003c \"Detected: \" \u003c\u003c type-\u003emime \u003c\u003c \" (\" \u003c\u003c type-\u003eextension \u003c\u003c \")\\n\";\n    } else {\n        std::cout \u003c\u003c \"Unknown file type\\n\";\n    }\n    return 0;\n}\n```\n\n## License\n\nMIT License (c) 2025 Prince Roshan","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fcpp-filetype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagent-hellboy%2Fcpp-filetype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagent-hellboy%2Fcpp-filetype/lists"}