CD image size recovery suggestions

Frank Schoep frank at ffnn.nl
Mon Aug 28 12:24:47 BST 2006


On Aug 28, 2006, at 1:47 AM, Colin Watson wrote:
> I spent a little while this evening looking through options for
> recovering the enormous size deficit (up to 30MB in places) on our
> current CD images, and applied one or two things before realising  
> that I
> could easily sort out Ubuntu in the short term by removing lots of
> language packs. However, this isn't an ideal approach in the medium
> term, so I still want to explore options.
>
> Before replying to this on ubuntu-devel suggesting other things to
> remove, *please* check
> http://people.ubuntu.com/~cjwatson/germinate-output/edgy/ to ensure  
> that
> your suggestion will have a measurable impact on CD size. To forestall
> some expected responses, removing very high-profile applications like
> OpenOffice.org or Firefox is not on the table, and since the  
> addition of
> Mono has garnered a certain amount of PR attention I'm not all that  
> keen
> on backing that one out either.

I'm sure that my following suggestion is already considered for Edgy,  
but I thought it wouldn't hurt to bring this up again.

During Dapper I proposed recompressing PNGs in various packages to  
save disk space in installed versions and CD images. I heard some  
talk about this already being done, but there's still room for  
improvement. I did some initial analysis this midday which is far  
from complete or optimal, but provides some insight in the numbers.

I followed a very simple procedure as I didn't have a lot of time  
available. I used the following command to copy PNGs from /usr/share  
to a single directory and then recompress them using OptiPNG:

find /usr/share -name "*.png" -type f -exec cp \{\} . \; -print
optipng *.png

The results are as follows (I did three tests, using three different  
sets of PNGs in /usr/share):

/usr/share/gnome/help
Original PNGs: 11.259.366 bytes
Recompressed: 7.638.104 bytes
Savings (files): 3.621.262 bytes
Savings (tar/gz): 1.938.042 bytes

/usr/share/example-content
Original PNGs: 4.405.970 bytes
Recompressed: 3.852.205 bytes
Savings (files): 553.765 bytes
Savings (tar/gz): 551.718 bytes

/usr/share
Original PNGs: 33.231.090 bytes
Recompressed: 27.459.007 bytes
Savings (files): 5.772.083 bytes
Savings (tar/gz): 4.032.249 bytes

The savings using a more elaborate recompression scheme are obviously  
higher, but at the very least these numbers give you some indication  
of the minimal amount of space we can save in various places by  
recompressing the PNGs.

One other flaw in my current setup is that files with the same  
filename are overwritten so only one of them is taken into account,  
this can make a huge difference for localized documentation  
(screenshots).

If you think this option is worth investigating more, I'd be happy to  
come up with more accurate numbers. During Dapper I posted some  
results as well, the thread can be found here:
https://lists.ubuntu.com/archives/ubuntu-art/2006-April/001190.html

I'm looking forward to your thoughts, thanks for reading.

With kind regards,

Frank Schoep



More information about the ubuntu-devel mailing list