Swfpack provides a convenient way of compressing and decompressing Adobe Flash files also known as Macromedia Flash. This utility can act as an extension for the SWFTools - the collection of utilities for working with Adobe Flash files.
$ autoreconf --install
$ mkdir build && cd build
$ ../configure
$ make && make install
$ swfpack -h
usage: swfpack [ -cdhz ] [ filename ]
-h, --help print this help and exit
-d, --decompress decompress given SWF file
-c, --compress compress SWF file using DEFLATE algorithm
-z, --zcompress compress SWF file using LZMA algorithm
In place compression/decompression:
$ swfpack -c uncompressed.swf
or
$ swfpack -d lzma-compressed.swf
Swfpack can also read SWF file content from the standard input and write processed file to the standard output. By this way of processing, one can use swfpack as a part of processing toolchain, e.g.:
$ curl http://www.swftools.org/flash/box.swf |swfpack -z >box.swf