There have been plenty of posts describing how inefficient the zip compression is on XAP files, and how it's possible to shrink the size of a XAP by simply unzipping and rezipping using a utility like WinZip.
Another tool we've tested that has now become a regular part of our toolbox is PNGGauntlet, which is a terrific, free utility that can shrink the file size of PNG files. Learn more about it here.
To give you a real world example, we have an application we're going to launch this upcoming week. At code complete, the XAP file size was 146K. After using PNGGauntlet on the images in the app, the size dropped to 122K. After unzipping and rezipping, the app weighs in at 89K. That's a 61% reduction in filesize by doing almost nothing on my part. While the change is usually not that drastic, it's definitely woth the minimal effort on my part to see what kind of reduction I can get.
Entries (RSS)
January 5th, 2009 at 3:57 pm
Nice tool! Handy for anything using PNG files.
I noticed the orginal creator of the PNG compressor even has a Zip compressor claiming better compression then most others - every little bit helps.
http://advsys.net/ken/utils.htm
February 3rd, 2009 at 12:55 pm
You should try ComponentOne’s XapOptimizer.
It reduces the size of XAP files by removing unused types and xaml resources from the referenced assemblies. It also automatically recompress the xap as you mentioned and also supports obfuscation!.
Take a look at it: http://demo.componentone.com/silverlight/XapOptimizer/