Puremagic

From COPTR
Revision as of 10:26, 30 April 2024 by 172.104.134.96 (talk) (add puremagic)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search



Puremagic is a cross-platform pure python module that will identify a file based off it's magic numbers
Homepage:Unknown
Source Code:https://github.com/cdgriffith/puremagic
License:MIT
Cost:Free
Function:File Format Identification




Description[edit]

It is designed to be minimalistic and inherently cross platform compatible. It is also designed to be a stand in for python-magic, it incorporates the functions from_file(filename[, mime]) and from_string(string[, mime]) however the magic_file() and magic_string() are more powerful and will also display confidence and duplicate matches.

It does NOT try to match files off non-magic string. In other words it will not search for a string within a certain window of bytes like others might.

Advantages over using a wrapper for 'file' or 'libmagic':

  • Faster
  • Lightweight
  • Cross platform compatible
  • No dependencies

Disadvantages:

  • Does not have as many file types. ("Only" 1600 at the time of posting)
  • No multilingual comments
  • Duplications due to small or reused magic numbers

(Help fix the first two disadvantages by contributing!)