Rockbox mail archiveSubject: Re: cvs: apps settings.c,1.152,1.153
Re: cvs: apps settings.c,1.152,1.153
From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Wed, 28 May 2003 10:11:11 -0400
As it happens, I am working on a standard way to do the compression, but as it is most of the settings are compressed, that's why ther's plenty of space in config block.
Everyting in struct user_settings is either an int or a bool or an array of char. sizeof( bool ) == sizeof( char ), so they get compressed from CHAR_BIT bits to one bit; nearly all the ints are comprressed to 7 bit quantities or smaller (0xFF is used to indicate bad or superseded config data, so nothing can have that bit pattern, thus the 7 bit quantites); a few (about 5) ints really are ints. The char arrays are not copmpressed.
I'm not surewwhy Bjorn would prefer 10-tick units, again, there's a lot of unused space in config_block -- where the compressed data is stored on its way to the disk -- ; on the other hand, struct user_settings -- where the uncompressed data ais used -- is at about 568 (>512, anyway) bytes currently, so he may be wishing to save that space.
Quoting Kjell Ericson <Kjell.Ericson_at_haxx.se>:
> On Wed, 28 May 2003, Björn Stenberg wrote:
> > > Moved the settings for jump scroll to a more correct place.
> > It would be nice if you compressed the info to less than two bytes as well.
> I think many settings in the configuration table could be changed in this
> manner. Shouldn't we/somebody look at all settings and shrink the table?
> Making special code for each setting will cost more code than we gain in
> memory, and the settings area has 0x70 bytes left so there is no hurry there.
> Or are you just more annoid that recorder owner lost two bytes? My first
> vision was to to put the jump scroll settings where the font-name is laid (no
> fonts in the player), but the font-responsible didn't ifdef any of his code
> That would in my eyes gain a lot more space (but I didn't want to be first
> with overloading settings).
> > the second value could be compressed into 5 bits by using 10-tick units
> > instead of ticks.
> ...I just stole the format from "scroll delay" (not saying I can change, just
> explaining that I'm follow the path of others).
> // Kjell
-- Archos FM has a Rockbox!Received on 2003-05-28