views:

361

answers:

1

I'm building a SWF using the command line compiler mxmlc.exe. The compiler writes the output file size as part of it's stdout. If I run the compiler multiple times in succession without changing the actual source code, I see the file size bounce up and down a few bytes at a time.

C:\>mxmlc.exe Gallery.as
C:\Gallery.swf (28443 bytes)

C:\>mxmlc.exe Gallery.as
C:\Gallery.swf (28442 bytes)

C:\>mxmlc.exe Gallery.as
C:\Gallery.swf (28440 bytes)

C:\>mxmlc.exe Gallery.as
C:\Gallery.swf (28442 bytes)

I can't think why this would possibly be the case. Even if I delete the output file each time, the re-generated file size still varies in this way.

Any ideas why?

+10  A: 

The Flex compiler includes some information in your SWF that changes from build-to-build, such as the date and time it was built. The SWF is then compressed. Sometimes the compression will work a bit better than others for the varying metadata, thus the minor changes in file size.

http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_16.html#145380

natacado
Thanks for the explanation. Looks like this is your first post on Stack Overflow too. Welcome to the site!
Drew Noakes
Thanks... Glad I could help. I even got enough reputation points to reply to your commment. :-)
natacado