dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: clever algorithm string ->int id wanted

Re: clever algorithm string ->int id wanted

From: Daniel Stenberg <>
Date: Fri, 4 Oct 2002 07:40:44 +0200 (MET DST)

On Thu, 3 Oct 2002 wrote:

> I need an algorithm to calculate a unique id from a string, just similar to
> calculating a hash key.

Since the strings are all known at the time you want to calculate the hashes,
you can generate a "perfect hash":

A tool that makes this easier, is gperf:

Daniel "Bagder" Stenberg --
Received on 2002-10-04

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy