MIME updates
Jaap Karssenberg
j.g.karssenberg at student.utwente.nl
Sun Oct 19 00:29:12 EEST 2003
On Fri, 17 Oct 2003 12:28:43 +0100 Geoff Youngs wrote:
: I personally determine the maximum pattern length, read that in when
: first scanning the file and use all of that, but 32 should be fine for
: all the binary formats I can remember coming across...
In my first implementation I also used to read the maximum pattern
length, but then I came across a mimetype with a huge offset (msword if
i remember correctly) and it slowed down the process badly, my current
implementation simply seeks the right position for every pattern
(perlfunc 'seek' equivalent with C func 'fseek') and performance is up;
not sure whether it is Perl or the kernel, but on some level the data
seems to be buffered automaticly.
--
) ( Jaap Karssenberg || Pardus [Larus]
: : http://pardus-larus.student.utwente.nl/~pardus
) \ / (
",.*'*.," Proud owner of "Perl6 Essentials" 1st edition :)
More information about the xdg
mailing list