Jump to content
  • Advertisement
Sign in to follow this  
Goguigo

.jar file size? (mobile games)

This topic is 4861 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there ant utility able to compress the files from a mobile game in .jar format, better than other utility? THanks

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Goguigo
is there ant utility able to compress the files from a mobile game in .jar format, better than other utility?


THanks


No. jar files are already compressed. Attempting to doubly-compress them or use a different compression algorithm can result in slower performance or even prevent execution, especially if jar and midlet execution is handled in hardware.

You already ought to use 'compressed' resources, such as smaller images and lower bitrate sounds, but they're generally lossy compression.

frob.

Share this post


Link to post
Share on other sites
You can shave off quite a lot of space by using something other than "jar" to compress them. jar files are just .zip files.

I use info-zip, with various other options


<arg line="-r" />
<arg line="-9" />
<arg line="-D" />
<arg line="-X" />


The "No directories" option does not store directories in the .jar. Because you're not going to uncompress it, there's no need to have directories. The unix attribs is because I'm building this on Linux and it would otherwise add Unix permissions into the .jar - which takes up space and is ignored by J2ME.

Mark

Share this post


Link to post
Share on other sites
I've got a lot of reading material for you: an 8 page thread about minimizing jar size.

It's starts discussing obfuscation and other things, but goes on to the place where you are likely to save the most space: image optimizations.

You can use other programs to get a little more compression when you pack the jar (it's just a zip file like Mark said). From my experience 7zip has given the best results. But you need to be careful because some phones might have troubles with those ultra-compressed jars and not install your app.

shmoove

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!