Libmagicxx v8.2.1
A C++ wrapper library over the Magic Number Recognition Library.
|
Libmagicxx is a C++ wrapper library over the Magic Number Recognition Library. It provides an easy-to-use interface through the magic
class, enabling the identification of file types based on their content rather than file extensions.
You can download the latest release packages and source code directly from the GitHub Releases page.
After downloading, follow the installation instructions below for your platform.
For Debian-based Linux distributions: Use the apt
command to install the .deb
package.
For Red Hat-based Linux distributions: Use the dnf
command to install the .rpm
package.
For Windows: Install the libmagicxx-<version>-windows-x86_64.exe
package provided by the NSIS installer. Run the installer and follow the on-screen instructions to complete the installation.
Libmagicxx is designed to be easily integrated into CMake-based projects. To use Libmagicxx in your project after installation, follow these steps:
Add the following lines to the top level CMakeLists.txt
file of your project to include and link Libmagicxx.
Include the magic.hpp
header file in your source files. Below is an example code snippet that demonstrates how to print the MIME type of the default database file using the magic
class.
For more examples, refer to the examples directory.
For comprehensive guides, API references, and detailed information, visit the Libmagicxx Documentation Site. The source code for the documentation site is available in the documentation/html
directory of the repository.
For Debian-based Linux distributions: Use the apt
command to remove the installed .deb
package.
For Red Hat-based Linux distributions: Use the dnf
command to remove the installed .rpm
package.
For Windows: Use the uninstaller provided by the NSIS installer. Navigate to the "Add or Remove Programs" section in the Control Panel, find libmagicxx
, and click "Uninstall."
We welcome contributions of all kinds, including bug fixes, feature requests, documentation improvements, and code enhancements. Please see the CONTRIBUTING.md file for detailed guidelines on how to contribute or build Libmagicxx from source.
For information on reporting security vulnerabilities, please see the SECURITY.md file.
Explore the source code of Libmagicxx on GitHub.
Libmagicxx is licensed under the GNU Lesser General Public License Version 3. For more details, see the COPYING.LESSER file.
This project is a personal hobby project developed in my own time and with my own resources. It is not affiliated with, endorsed by, or created on behalf of any employer, company, or organization. No proprietary or confidential information belonging to any employer or third party was used in its development. This project is not intended for any commercial purpose, income generation, or professional service.