CWS2FWS v0.81c ============== CWS2FWS.TXT - Fred C. Macall 4 April 2009 Overview and System Requirements CWS2FWS is a "utility [which] coverts compressed Macromedia Flash (.SWF) files to uncompressed ones," by Alex Beregszaszi. See: http://www.irisa.fr/texmex/people/dufouil/ffmpegdoxy/cws2fws_8c-source.html for his publication. In CWS2FWS version 0.81c, I have made a few small changes, necessary for making it with the DJGPP tools described below. For example, I have added the O_BINARY mode indicator to the program's file open( ) calls. Also, I have adjusted a few of the program's printf( ) calls to suit my taste. Upon inspecting an .SWF file with DEBUG or another tool, you'll find that it may begin with a "magic" character sequence of either CWS or FWS. Files beginning with FWS are "full" or "original" .SWF files. While, those beginning with CWS are compressed versions. So, CWS2FWS may be seen to operate on a CWS version .SWF file, to bring back its FWS version .SWF file "source". This package (C2F81CPM.ZIP) contains my quick and dirty DJGPP make of CWS2FWS.EXE, for DOS. I've made CWS2FWS.EXE using DJGPP v2.03 resources and tools, in DOS. These include an elegant 2 KB "stub loader", the GNU GCC v4.12 compiler, and the UPX v3.02 eXecutable Packer. These tools are likely available to you, as they were available to me, from: http://www.delorie.com/djgpp/ A large component of CWS2FWS.EXE consists of a set of ZLIB GZIP (un)compression modules. For this make, I've used the ZLIB version 1.2.1 source, by Jean-loup Gailly and Mark Adler, which is included in Watt-32 version 2.2 dev.rel.10. Watt-32 is available from: http://www.bgnett.no/~giva/ This make of CWS2FWS is intended to run on any 80386 based, or later, IBM compatible PC, with at least 4 MB of RAM. It is a 32-bit Protected Mode program, which requires 32-bit DOS Protected Mode Interface (DPMI) service. Some DPMI services I've used with DosLynxS, which is made using similar techniques, are described in the included document: DPMIREVU.HTM . I welcome any and all comment(s) and/or question(s) on this make of CWS2FWS. Most of my contact information is listed at the bottom of this document. The graphic included in the package (FCMEMADR.GIF) displays my e-mail address. How It Works CWS2FWS.EXE starts off by unpacking itself into memory and displaying its name and version information. On an older (read: slower) PC, this may take a few seconds. Upon finding fewer than two command line parameters, it displays its Usage message and terminates. For the record, this message reads: Usage: CWS2FWS The infile.swf is expected to name an existing compressed .SWF file. i.e.: One that begins with the magic sequence: CWS . The outfile.swf is assumed to name a non-existent file, to be created, for receiving the uncompressed .SWF file output. This file will begin with the magic: FWS . If more than two command line parameters are given, the rest are ignored. CWS2FWS then attempts to open the two files specified. It reads and checks infile.swf's eight octet "header". Reports on the file sizes expected. And, writes outfile.swf's eight octed header. It then enters a read, inflate, and write loop, which runs until the infile.swf is exhausted or the ZLIB inflate( ) routine reports an exception. That's about all there is to it. Installation and Configuration 1. PKUNZIP C2F81CPM.ZIP into an empty directory. 2. Copy the four resulting files to where you want them. (No (further) configuration is available.) 3. Empty and remove the originally empty directory, if you like. Copyright Notices CWS2FWS.EXE v0.81c and the libraries, materials, and tools used to make it contain the following Copyright notices: Copyright (C) 1995-2003 Jean-loup Gailly and Mark Adler Copyright (C) 1995-2003 Mark Adler inflate 1.2.1 Copyright 1995-2003 Mark Adler The STUB.EXE stub loader is Copyright (C) 1993-1995 DJ Delorie. Permission granted to use for any purpose provided this copyright remains present and unmodified. This only applies to the stub, and not necessarily the whole program. GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 021239, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This file is packed with the UPX executable packer http://upx.sf.net UPX 3.02 Copyright (C) 1996-2007 the UPX Team. All Rights Reserved. Disclaimer This software is published in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Fred C. Macall K8GIV 1019 Pennfield Road Cleveland Heights, Ohio, 44121, U.S.A. (216) 382-3415