cws2fws
CWS to FWS Flash file Decompressor

cws2fws is a short Perl script I wrote to convert CWS compressed Flash v. >= 6 files to FWS files. Motivation for this was to be able to use the SWF::Search module which currently does not open compressed CWS files.

how does it work?

it is as simple as it can get.
cws2fws FILENAME.swf reads the first 8 bytes of FILENAME.swf substituting the CWS header for FWS. it then reads from byte 9 to EOF decompressing the stream via the zlib uncompress interface. the resulting decompressed stream and the new FWS header are then concatenated to output a FILENAME.fws.swf

legal status

the Adobe license states that, as long as the purpose of studying the SWF format is to make it work with the Flash Player, then it is legal to produce uncompressed SWF files. What is not allowed is to produce a player based on the file format. the files produced by cws2fws are therefore meant to be viewed in the Flash players distributed by Adobe Inc exclusively

DMCA: the DMCA has a court precedent set such that any type of reverse engineering meant to promote interoperability of technology is perfectly legal. all the information obtained to develop this small tool is publicly available on the web or can obtained through simple observation. i would not go as far as calling this trivial script a result of reverse engineering, but you never know...i'm not a lawyer!

so where is it ?

here (latest is v.0.0.1)

DISCLAIMER: i offer no guarantee as to the usability of this program, it is provided "as is" for your personal use.

author: Jose M. A. Fonseca (zefonseca [a@t] gmail.com)