[Clamav-devel] Libclamav - filetype detection functionality

2012-09-11 Thread Alexandre Dias
Hello,

I need to detect the type of a given file (so that in my own scanner, which
uses ClamAV's signature set, I can cross-reference it with any signature
that matches).

However, if I'm not mistaken, such functionality is not currently exposed
in libclamav.

Is there any way to access it besides directly modifying libclamav (and
thus losing the access on any update to ClamAV) ?

Thanks.

-Alexandre Dias
___
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net


[Clamav-devel] Question about matcher-bm.c

2012-07-02 Thread Alexandre Dias
Hello,

I'm studying multi-pattern matching and I was browsing the source code for
ClamAV's implementation of a multi-pattern matcher (Wu-Maber based)
algorithm.

I've got a question regarding the block and minimum size values.

At the moment, both the block size and the minimum pattern length are set
to 3 bytes.

If I understood the algorithm correctly, this means that the only possible
shift values are either 0 (at which point a match is possible), or 1
(minimum pattern size - block size + 1).

If this is the case, given that the algorithm can only move at most one
byte at a time, what is the advantage of using this algorithm instead of
Aho-Corasick (besides space efficiency) ?

Thank you for your time.

Best regards,

-Alexandre Dias
___
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net