I am very impressed by the work from
Joa Ebert, especially the
Hobnox audiotool that keeps blowing my mind every time i go and se it / showing it to others.
Joa has been working on a suite of tools to optimize swf files. Specifically he has developed software to read and write swf bytecode. And while doing this the software can optimize different things.
I have looked at the reducer.jar tool and the tdsi.jar tool(TurboDieselSportInjection).
The reducer tool can optimize png's embedded in the swf file, and thus reduce the size of you file. It does that by converting the png into a jpeg, but doing some alpha channel magic on the way so you do not loose transparancy.
I have tried the reducer on a couple of files:
File1.swf 395kb. developed in flex, containing a bunch of embedded png "icons".
File2.swf 947kb. developed in flex, containing almost no embedded pngs.
File3.swf 510kb. developed in flex, containing a mix of embedded pngs.
File 1 and 2 only got reduced a couple og bytes. This does however makes sense because the reducer does not "reduce" very small png's because these acually sometimes can get larger.
File 3, contained a very large png - 1000X1000 pixels. It is almost 100 kb in it self. Running the reducer on this swf with the default settings i got a reduction of about 42 kb!
This is really impressive! just by running a simple command i get a reduction of about 10% - very nice. Oh and by the way the result was not different visually from the original :)
Then i quickly tried out the TurboDieselSportInjection (I love that name!) on of my current projects. It is a data centric project that retrieves a lot of data from a php backend. Retrieving 5000 rows of data in about 4 seconds. Running the tdsi on this project acutally made the swf - start more quicly! - it took a couple of second of - how many is difficult to say but it is clearly an improvement from before.
With the Apparat suite that Joa is working on, he has really opened up the world of how much the swf files can be optimized by running a couple of simple commands. Very impressive!
Now if only Adobe would take the same measures into their compiler...