Coder Social home page Coder Social logo

determinater's Introduction

determinater

Efficient, flexible, and accurate client-side file identification tool.

Notice: this is a work in progress and is not yet ready for use. Once it is functional, I will be sure to version it appropriately.


#### Summary The intent of this library is to identify a [`File`](http://www.w3.org/TR/FileAPI/#dfn-file) or [`Blob`](http://www.w3.org/TR/FileAPI/#dfn-Blob) by looking for "magic numbers" or "magic bytes". This can be efficiently accomplished client-side by [slicing](http://www.w3.org/TR/FileAPI/#slide-method-algo) off a small initial portion of the file, converting that portion of the file's bytes to a hex string representation using [FileReader](http://www.w3.org/TR/FileAPI/#FileReader-interface), and then comparing these bytes to a [table of magic numbers](https://github.com/rnicholus/determinater-data/blob/master/signatures/signatures.json).

The process can be made even more efficient if a subset of important file types is provided. In the abcense of such a filter, web workers can be utilized wherever possible to ensure matching does not tie up the UI thread.


#### Supported Browsers (planned) * IE10+ * Firefox * Chrome * Safari 6+ * Opera 11.1+ * iOS 6+ (Safari, Chrome, and Firefox) * Blackberry 10 * Android 4+ (Chrome & Firefox)
#### License This library is MIT licensed. See the [license file](LICENSE) for specifics.

determinater's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.