wiza-0.1.4 is not a library.
wiza - The File Wizard ✨
What is zat? Now you know.
A Rust-powered alternative to the file command, with JSON support, custom rules, and a sprinkle of magic.
Features
- Fast file type detection using magic numbers and file signatures
- Polyglot file detection - identify files that contain multiple valid formats
- JSON output for programmatic use
- Recursive directory scanning with
-Rflag - File extension based acceleration for faster matching
- Embedded database with common file type rules
- Rule compilation with the
compilesubcommand
Installation
Usage
Basic file identification
)
Polyglot file detection
wiza can detect polyglot files - files that are valid in multiple formats.
To detect polyglot files, use the --all flag to show all matching rules:
) )
JSON output
|
{
}
Compile custom rules
Backward compatibility with file / libmagic rule format
Create magic rule files following the standard magic format. Example:
# my_rules/xyz
0 string MYTYPE My custom file type
>4 byte 1 version 1
>4 byte 2 version 2
Then compile with:
Why the name "wiza"?
wiza is a playful combination of:
- "Wizard": Ties to the "magic" of file type detection (using magic numbers)
- "What is zat?": A conversational way to ask "What is that?" (for French speakers)
License
This project is licensed under the GPL-3.0 License.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Acknowledgments
- Inspired by the Unix
filecommand but with modern improvements