using apparat (reducer) from inside FDT4

50 views
Skip to first unread message

Sebastian Telschow

unread,
Jun 1, 2011, 11:39:08 AM6/1/11
to apparat-...@googlegroups.com
Hi Joa,

I´ve used apparat for several projects in the past, so first thank you for the nice toolset!

Now i have a problem with the apparat subfeature "reducer" using it from inside of FDT4 (4.4.0.22).
When i select to use reducer with lzma-compression enabled after compiling my swf, it outputs it´s expected messages:

------------------
1091245 bytes written to file E:\project\abc.swf in 5528 ms

[APPARAT] 1 Tasks:
1. reducer -l -i E:\project\abc.swf -o E:\project\abc.swf
[APPARAT] Processing reducer
[APPARAT] Creating LZMA compressed file.
[APPARAT] Compression ratio: 8,92%
[APPARAT] Total bytes: 97340
Launching External SWF Viewer
------------------

When I decompile the swf then, it comes up with all my classes and assets as if the lzma/Matryoshka-wrapping has not been applied.
So i tried to use reducer utilising 7z for comparison and that´s the output:

------------------
1091246 bytes written to file E:\project\abc.swf in 6652 ms

[APPARAT] 1 Tasks:
1. reducer -i E:\project\abc.swf -o E:\project\abc.swf
[APPARAT] Processing reducer
[APPARAT] Compression ratio: 8,92%
[APPARAT] Total bytes: 97341
Launching External SWF Viewer
------------------

As you can see the compression-ratio is exactly the same using both compression methods, lzma and 7z: 8,92%.
With my previously created ant using lzma and seperatly downloaded apparat/scala installation I got this output:

------------------
Buildfile: E:\project\apparat.xml
3. reducer (lzma):
     [exec] [INFO] Apparat -- http://apparat.googlecode.com/
     [exec] [INFO] Launching tool: Reducer
     [exec] [INFO] Creating LZMA compressed file.
     [exec] [INFO] Compression ratio: 24,78%
     [exec] [INFO] Total bytes: 246270
     [exec] [INFO] Completed in 7532ms.
BUILD SUCCESSFUL
Total time: 14 seconds
------------------

Using my last try i got that Matryoshka-magic embedded into my swf.
As i can see the (working) seperatly downloaded versions of apparat and scala (1.0 RC9/2.8.1) are identical to the ones shipped with FDT4.
The not-applied-lzma-effect happens under Windows7/32 and OSX 10.6.7

Do you have a hint for me what´s going on?

Thank you, Sebastian

Alan Klement

unread,
Jun 1, 2011, 12:33:16 PM6/1/11
to apparat-...@googlegroups.com
Hey guys,

Since I'm the one who spec'd out the FDT & Apparat integration, maybe
I can help you out ;)

Here are some pieces that might help us figure it out.

The FDT & Apparat integration is very straightforward. FDT uses
Apparat directly by just passing it arguments and then reads the
output to know when it's done. AFAIK, LZMA is how Appart's reducer
'works'. If your SWF has no LZMA compression in it, then my best
guesses are:

1) It's silently failing (FDT also ignores Apparat errors I believe).
2) FDT is invoking Apparat's incorrectly.

If anyone else has more info on what might be wrong, please let me
know. I can talk with the dev directly or (gasp!) look at the source
code directly and do my best ;). It would seem the best place to start
is to compare the two ways that Apparat is being invoked and compare
them - anyone have thoughts on this b/c I don't at the moment.

Alan

Joa Ebert

unread,
Jun 1, 2011, 12:38:54 PM6/1/11
to apparat-...@googlegroups.com
I have the feeling that a parameter is not set which might be required
but Ant sets this parameter.
Sorry if I cannot help more at the moment but I got a lot of stuff to
finish.


Best,

Joa

Reply all
Reply to author
Forward
0 new messages