magic-d 1.0.0

D binding around magic number recognition library


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

magic.d

D binding around magic number recognition library.

Usage

<pre><code>

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");

</code></pre>

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
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 213 downloads total

Score:
0.9
Short URL:
magic-d.dub.pm