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: <>
Date: Fri, 04 Oct 2002 00:35:00 +0200

On Thu, 3 Oct 2002 16:40:55 -0400, "M. OReilly"
<> wrote:

>Would a simple checksum work? A two digit hex checksum would be enough for
>256 unique entries.

Maybe a checksum is not sufficiant to really distinguish two different
strings. BTW I wouldn't be surprised if we exceed a limit of 256
different commands. Well. Somewhen, maybe.

I read in
that they make a hash key for strings with

s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]

Because I'm not that much interested in speed while loading a key
scheme I'll take that (in spite of all those multiplications) unless I
accidently stumble across something better.

Received on 2002-10-04

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