# How to use apparat to optimize SWF files?

**URL:** <https://forum.kirupa.com/t/how-to-use-apparat-to-optimize-swf-files/325446>\
**Category:** flash\
**Created:** [October 16, 2011, 11:04am UTC](https://forum.kirupa.com/t/how-to-use-apparat-to-optimize-swf-files/325446 "2011-10-16T11:04:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeldalink](https://avatars.discourse-cdn.com/v4/letter/z/94ad74/32.png) [@zeldalink](https://forum.kirupa.com/u/zeldalink)\
**Post date:** [October 16, 2011, 11:04am UTC](https://forum.kirupa.com/t/how-to-use-apparat-to-optimize-swf-files/325446/1 "2011-10-16T11:04:54Z")

</div>

I’m just [installing Apparat](http://www.reallyfancy.com/2011/03/08/ant-apparat-and-flashdevelop-a-total-beginner%e2%80%99s-guide/), and I’m interested in using it to optimize my SWFs.

On its [google code page](http://code.google.com/p/apparat/) some optimizations are listed out … sliding window, flowgraph … so is it possible to make use of these optimizations? **how?**

I have heard of the -reducer command, does it perform the optimizations? are there other commands you can use? or do you have to build apparat yourself and access it via scala?

**UPDATE** :  
I typed “reducer help” on the command line, and it seems that this program performs some of the listed optimizations:

```auto
  -i [file] Input file
  -o [file] Output file (optional)
  -d [float] Strength of deblocking filter (optional)
  -q [float] Quality from 0.0 to 1.0 (optional)
  -m [true|false] Merge ABC files
  -s [true|false] Sort constant pool (only if -m is specified)
  -l [true|false] Use LZMA compression
  -t [quiet|preloader|custom] Matryoshka type (default: quiet)
  -f [file] Custom matryoshka SWF wrapper (required if -t cu
  -b [true|false] Merge control flow if possible (experimental)

```
