On Mon, Mar 25, 2002 at 07:21:33PM +0800, ha shao wrote: > On Sat, Mar 23, 2002 at 04:33:06PM +0200, Vasilis Vasaitis wrote: > > > And yeah, if Xlib already has this function, I don't have to go write one > > > from scratch blindly (because I am new to hashing... ;-) Thanks for the > > > tip! :-) > > You might also want to try GNU gperf, a perfect hash function generator. I > > haven't used it personally, but AFAIK it's a good tool for this kind of > > task. > gperf will generate a hash function for a known set of data. > It will generate an almost perfect hash with a few collisions. Actually, > the size of the hash table can be control at command line. > Collisions are handled by the generated hash functions for you.
Thank you both for your tips on gperf, Vasilis and ha shao. I tried it a few days ago on Debian (apt-get install gperf does it) and I was really amazed by it. :-) As for BIG5-HKSCS table for glibc, James has come up with an excellent solution in keeping the size down. A very neat summary index table. :-) More work (esp. the charmap file) is needed before submitting to glibc, but yes, I am really impressed by his work. :-) I'll play with gperf and hashing after some deadlines at work. Very helpful tools indeed. :-) Cheers, Anthony -- Anthony Fok Tung-Ling ThizLinux Laboratory <[EMAIL PROTECTED]> http://www.thizlinux.com/ Debian Chinese Project <[EMAIL PROTECTED]> http://www.debian.org/intl/zh/ Come visit Our Lady of Victory Camp! http://www.olvc.ab.ca/ _______________________________________________ I18n mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/i18n