6

As mentioned in release notes to Flash Player 11, developers added LZMA compression support.

Question is how can one enable this support? Maybe there's an mxmlc option? Or more steps?

Simply setting -swf-version=13 and switching playerglobal.swc in sdk didn't work for me.

moropus
  • 3,672
  • 1
  • 22
  • 30

2 Answers2

6

SWFs compiled with the -swf-version=13 parameter automatically support LZMA compression, meaning that LZMA compressed SWF files can be loaded at runtime, however the SWFs output by Flash Builder (as of 4.5.1) are still compressed with the default zlib compression.

Tinic Uro, one of developers of Flash, wrote a utility to convert SWF files from the default zlib compression into lzma. This would need to be done as additional step after compiling, at least until Flash Builder starts supporting LZMA output.

Update (clarification):

The flex SDK does not yet output LZMA compressed SWF files no matter what options you use, which is why the utility is needed. The 'swf-version' compile parameter tells the SDK to output a Flash 11 SWF. This is does not mean that the SWF is compressed with LZMA compression, just that it is able to use it. The gist of this is Flash 11 is able to support LZMA compressed SWFs, but you need to do additional work to actually make a LZMA SWF.

Luke Van In
  • 5,215
  • 2
  • 24
  • 45
  • It seems that it's not working. I've tried compiling my project with different combinations of `-debug`, `-target-player` and `-swf-version`, tried accordingly changing "flex-config.xml" in SDK (4.5.0.20967) - and resulting size of swf didn't depend on `-swf-version` parameter. The utility provided however produced smaller swfs. – moropus Oct 26 '11 at 08:55
  • That is correct - the flex SDK does not yet output LZMA compressed SWF files no matter what options you use, which is why the utility is needed. The 'swf-version' compile parameter tells the SDK to output a Flash 11 SWF. This is does *not* mean that the SWF is compressed with LZMA compression, just that it is *able* to use it. The gist of this is Flash 11 is able to support LZMA compressed SWFs, but you need to do additional work to actually make a LZMA SWF. Confusing I know. – Luke Van In Oct 26 '11 at 10:35
  • lukevanin, thanks for clarification anyway. Could you please update your answer with this additional note? – moropus Oct 26 '11 at 10:45
  • @moropus - the developers at adobe have little control over what features and bugs get attention. – 1.21 gigawatts Dec 16 '11 at 16:56
  • Does anyone know if Flash Builder 4.6 is using LZMA compression? It seems like it is??? – 1.21 gigawatts Dec 16 '11 at 16:57
  • @1.21 gigawatts - it seems like it is not. By default it produces the same output, non-LZMA. – moropus Dec 19 '11 at 09:48
2

I wrote a Python script that will do this conversion based on Tinic's code. It's a little easier to use if you're not on Windows.

jspiro
  • 21
  • 3
  • I am getting the error "Not a known player download type" when I try the lzma-converted SWF. My flash player is 11.2. How can I debug this ? – Chris Nov 20 '12 at 16:49