Registry / utility / infer
library0.19.0rscratesunverified

A small crate to infer file type based on magic number signatures.

# Cargo.toml [dependencies] infer = "0.19.0"
INSTALL
IMPORT
SIG · INFER
I
infer
utilityrustv0.19.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Infer
use infer::Infer;

Detect file type from magic bytes.

use infer::Infer; fn main() { let infer = Infer::new(); let buf = &[0xFF, 0xD8, 0xFF, 0xE0]; // JPEG header let kind = infer.get(buf).unwrap(); println!("File type: {}", kind.mime_type()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.19.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
infer — cargo add infer · libregistry