Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pepsighan/mime-detective

Detects the mime-type of a file using magic numbers
https://github.com/pepsighan/mime-detective

mime-types rust

Last synced: 4 days ago
JSON representation

Detects the mime-type of a file using magic numbers

Awesome Lists containing this project

README

        

### MimeDetective

The `MimeDetective` spies for the magic number of a file or buffer
and spits out strongly typed Mimes.

#### Example
```rust
extern crate mime_detective;
use mime_detective::MimeDetective;

let detective = MimeDetective::new().unwrap();
let mime = detective.detect_filepath("Cargo.toml").unwrap();
```