You are here: Re: Reading Binary Files « PHP Programming Language « IT news, forums, messages
Re: Reading Binary Files

Posted by Steve on 09/21/05 19:27

> I haven't tried it yet, but I was figuring I could maybe unpack the
> whole thing or partrs of it at a time into hex and then search it from
> there.

Maybe you can get away with that but your performance could be
dreadful. You'd have to deal with searching across part boundaries,
sliding windows and all that jazz. But you will have to decide whether
to optimise execution time, or storage cost, or memory use, or
compromise on everything. What is your main constraint? Space on disk,
memory, execution time or complexity of algorithm?

Could be that I'm underestimating the resources you have: on my desktop
even a brute force search (strpos) is reasonably fast against an 8M
string, and preg_match is faster. However I haven't looked at what this
is doing to my resources. Your server might buckle under a heavy load
if searching in pi becomes the Next Big Thing.

---
Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация