> -----Original Message-----
>
> Hi Everyone,
>
> I'm trying to reduce the size of my palm applications.  Does anyone
> know of any compression/decompression techniques at run-time or other
> methods for shrinking the size of palm applications?  I'm also looking
> into bitmap compression for my apps.
>
> I'd appreciate hearing other developer's solutions to this problem.
>
> Thanks!
> Robert
>


 Hi Robert,

 What development environment are you using ? It may make some difference
in terms of what help people can give. (I use GCC, PRCTools2 and PilRC.)

 First of all - if your app includes graphics, *PLEASE* make them at
least use the COMPRESS option to help reduce size. That's pretty
much essential, IMHO.

 I developed my own compression routines, to reduce the size further
and make it faster, but you may not want to go to that length. (Going
down an extra few %age points in size isn't going to be worth the
effort if you only have a few K of graphics.)

 Next, optimise your code by taking out sections which may be repeated
or nearly repeated and make them into functions called from many places.

 If you include data resources, use as small a type for each element as
you can. If you only need to hold numbers from 0-100, use an Int8 (or UInt8
etc)
instead of an Int32.


 I'm too scared to implement compression/decompression of the actual
app - but I'm sure other people might have tried it.

 If you're *really* into going to obsessive levels about making
code small, its worth going through your code to find areas that
can be reworked to give smaller code. For instance, if you're calling
a function 15 times with a number of parameters, like

 Foo(1);
 Foo(3);
 Foo(4);
 Foo(9);
 ... (missing values here...)
 Foo(33);
 Foo(36);

 It cuts down a load on size to do:

 Int8 bar[NUMBEROFBARS]={1,3,4,9 ... 33,36};
 for(n=0;n<NUMBEROFBARS;n++)
 {
        Foo(bar[n]);
 }

 Because there is more size in code for each function call and parameter.
(Which is faster is another question entirely)

 Again, no intention to be patronising here - I had to learn this stuff
when trying to make a game fit under the magic 32k segment barrier a couple
of years ago before we figured out how to do multi-segmenting. I was also
trying to learn C at the same time.

 Hope some of this helps!

 Regards,

 Howard.
--
Howard Tomlinson - [EMAIL PROTECTED]
Games Designer, Astraware Ltd. - http://www.astraware.com/
Games for Palm: http://www.astraware.com/palm/




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to