mmmagic: async file type detection goodness

126 visualizações
Pular para a primeira mensagem não lida

mscdex

não lida,
30 de abr. de 2012, 03:15:0730/04/2012
para nodejs
I recently needed a way to do file type detection/inspection, but felt
dirty using a child process to call `file` every time. So tonight I
sat down and wrote an async binding to libmagic: https://github.com/mscdex/mmmagic

Currently it's available for *nix only, although a pull request for
proper (read: builds with msvc) Windows support would be considered.
The only other requirement is zlib.

I expect to be adding support for raw Buffer and string inspection/
parsing in the near future.

Marak Squires

não lida,
30 de abr. de 2012, 03:21:3530/04/2012
para nod...@googlegroups.com
Super awesome!

I've been working on some mad science projects that are doing massive amounts of file detection. I'm assuming this will destroy the performance of my all JS hackery.

Looking forward to trying...


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en



--
-- 
Marak Squires
Co-founder and Chief Evangelist
Nodejitsu, Inc.

Nathan Rajlich

não lida,
30 de abr. de 2012, 12:49:0830/04/2012
para nod...@googlegroups.com
-1 point for still using a wscript file :p

You're already bundling libmagic so Windows support might be easy. You'd need to start out with adding a binding.gyp file so that the module can be built with node-gyp.

mscdex

não lida,
30 de abr. de 2012, 13:34:1430/04/2012
para nodejs
On Apr 30, 12:49 pm, Nathan Rajlich <nat...@tootallnate.net> wrote:
> -1 point for still using a wscript file :p
>
> You're already bundling libmagic so Windows support might be easy. You'd
> need to start out with adding a binding.gyp file so that the module can be
> built with node-gyp.

Yeah, I rarely write C++ addons, so I'm not quite familiar with the
gyp stuff yet. I'll get to adding a gyp file for mmmagic soon enough
though.

My main concerns about Windows compatibility were mostly to do with
libmagic itself, as it does have some *nix-only features like the
option to use a file descriptor for content type detection and
whatnot. I'll probably have to end up manually removing that stuff I
guess.

mscdex

não lida,
30 de abr. de 2012, 16:56:3730/04/2012
para nodejs
On Apr 30, 3:15 am, mscdex <msc...@gmail.com> wrote:
> I expect to be adding support for raw Buffer and string inspection/
> parsing in the near future.

Done. Buffer inspection now available in v0.0.2 :-)

Rajesh Kumar Jha

não lida,
30 de abr. de 2012, 13:15:1530/04/2012
para nod...@googlegroups.com
Can you tell me how event driven programming minimizing request and saving call to server.

In languages like Java™ and PHP, each connection spawns a new thread that potentially has an accompanying 2 MB of memory with it. On a system that has 8 GB of RAM, that puts the theoretical maximum number of concurrent connections at about 4,000 users.

how node helping us.
With regards
Er. Rajesh Kumar Jha
Software Engineer
mail : rkjha.it.in@gmail.com
Ph : +91-9560034877,7428444177

mscdex

não lida,
4 de mai. de 2012, 20:54:0004/05/2012
para nodejs
..... and v0.1.0 now has Windows support (no compiler or special
dependencies needed)! :-)
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem