Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mxmlc generates different binary on same source

I'm compiling a single .as file into swf using mxmlc.

Whenever I run mxmlc, results are different in size even when the source code is not changed.

For example,

// Test.as
package
{
    public class Test
    {
    }
}

And generates .swf using mxmlc :

mxmlc Test.as

and result size differs from 461 to 465 bytes.

I suppose that it's because of timestamp-like things in compiler, but I could not find how to fix or disable that. Any ideas on generating "same binary from same source" ? Thanks!

like image 564
Flexx Avatar asked Sep 10 '26 07:09

Flexx


1 Answers

Finally, I found that metadata tag (Tag Type = 77) and undocumented 'product info' tag (Tag Type = 41) both contains compliation time.

I succeeded to remove timestamps by following steps :

1. open swf and un-zlib
2. clear timestamps in metadata tag and product info tag
3. re-zlib and make new .SWF

But I'm not happy with that, thus this needs extra work on SWF file. I want to find the easier way. there may be 'bypass product info' option on mxmlc..

You can find more information on SWF File structure and metadata tag on http://www.adobe.com/devnet/swf.html and product info on http://wahlers.com.br/claus/blog/undocumented-swf-tags-written-by-mxmlc/

like image 76
Flexx Avatar answered Sep 12 '26 10:09

Flexx