magic-d 1.0.2

D binding around magic number recognition library


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

magic.d

D binding around magic number recognition library.

See man 3 libmagic for more info.

Usage

import magic;

auto m = new Magic(MAGIC_MIME_TYPE | MAGIC_NO_CHECK_BUILTIN);

m.load(null);

ubyte[] rar = [
	0x52, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00, 0xcf,
	0x90, 0x73, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
];

assert(m.buffer(rar) == "application/x-rar");

Authors:Anatoliy Anischovich

Dependencies: none

Versions:
1.0.2 2016-Feb-20
1.0.1 2014-Nov-30
1.0.0 2014-Nov-26
~master 2016-Feb-20
Show all 4 versions
Stats:

statistics are temporarily disabled.