LZMA support Just a heads up, Adobe added LZMA compression to the Flash spec a year ago -- swfchan.org won't allow files compressed this way to be uploaded. They seem rare in the wild, and can't be uploaded to 4chan's /f/, but they are supported by 7chan's /fl/. Flashbulb will support them in the next release and I think several decompilers handle them too. Ergo, you may want to add support. Example file here: http://www.xeloh.com/media/LZMA.swf Handling them is relatively straightforward. The compressed file looks like this: uint8 swf_signature[3] // "ZWS" uint8 swf_version // 13 or higher uint32 swf_decompressed_size // same as FWS and CWS files uint32 lzma_compressed_data_size // LzmaDecode() srcLen parameter uint8 lzma_propData[5] // LzmaDecode() propData parameter uint8 lzma_compressed_data[lzma_compressed_data_size] // LzmaDecode() src parameter The official Flash spec helpfully notes that it supports LZMA compression but fails to mention the file structure after the first 8 bytes. I had to figure it out via Google, a hex editor and trial-and-error. Anyway, grab the LZMA SDK for your choice of programming language here: http://www.7-zip.org/sdk.html And use LzmaDecode() to decompress from offset 0x17 to the end of the file. The decompressed file is the first 8 bytes of the compressed file with the output of LzmaDecode() appended to it, and "ZWS" changed to "FWS". The exact usage of LzmaDecode() will depend on what language you're using, and it may not even be called that, but note that LzmaDecode() and LzmaUncompress() are not the same. Not a huge priority, considering the general lack of adoption and Flash's declining popularity, but something to consider. |