I'm trying to decide if I should generate AS3 code for a certain complicated configurable set of business-logic rules, or should I express them as data, and write a state machine in AS3 to interpret it.
My goal is to get smallest compiled swf size. Speed is not an issue. Implementation complexity is not an issue as well. (Both within rational limits, of course.)
I can not disclose sufficient details, and I understand that I probably should do experiment instead of asking, but my question is:
What is average compression ratio for AS3 source when compiled to swf? How much bytes of swf per kilobyte of source code?
(I perfectly understand that the answer would be a very rough figure at best.)
Remember that
SWFfiles are already zlib compressed so that for the most part might erase any relative gains by going either data way or code way.If the initial load speed is what you are going after you can always factor out chunks of your code and load it on demand from another SWF file.