STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229594
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/62106357?noj=FRM62106357-22DO" width="1" height="1"></div>

Nick
Mail
Title
Required text body length: 2 characters. Maximum: 15000 characters.
A file is optional.

Age: 3601.31d   Health: 83%   Posters: 3   Posts: 7   Replies: 4   Files: 0

>>Aedako  11feb2015(we)19:28  No.17850  OP  P1
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.

>>Aedako  11feb2015(we)19:36  No.17851  OP  P2
Correction, about 3 years ago.
>>Aedako  11feb2015(we)20:19  No.17852  OP  P3
Another correction, offset 17 decimal, not hex.
>>!///SWFAnts  #ADMIN#  11feb2015(we)22:15  No.17854  SWF  P4R1
Hi, thanks for letting me know! Though, I've already known this for years... I've been, bluntly put, ignoring it.

I know, I know, sounds bad but as you said it's used by very few flashes so I've simply not prioritized it at all. Proof of this is that you're the first one to actually mention it to me in all this time. Almost nobody uses that compression type for their flashes and I actually got a bit upset when I found out about it. Seemed kinda unnecessary and would break a lot of old tools that probably are still in use today.

Don't get me wrong, I will fix it! Some day. I've had a bit of a guilty conscience about it, it's just that it will require a lot of digging through old code and I'm not looking forward to it. The archive system is set to save all flash files it comes across as broken, which would include flashes that has that kind of compression, so these flash files won't be lost. They will be added to the archive after the system can read them properly.

Since I now know someone actually cares I might get around to fixing it sooner. :)

>>Anonymous  12feb2015(th)00:11  No.17859  B  P5R2
>>17854
Sounds like you started to get quite a bit traumatized by that "old code" over the years :P
just kiddin'
>>Aedako  12feb2015(th)11:16  No.17870  OP  P6R3
Yeah, it was a pretty moronic thing for Adobe to do. I tried compressing a variety of files using default settings and came up with this data:

http://pastebin.com/Se6mN1N4

With rare exceptions, the typical swf compresses to about 95±5% of its ZLIB'd size. It would have been useful back in the dialup days, when it was a closed format with no third-party support, but completely breaking 15 years of backward compatibility to save a few 100 kB when we're routinely streaming DVD quality videos...who knows what they were thinking.

A few files, notably minus8's stuff, do gain a dramatic increase in compression. http://swfchan.com/29/143298/?TGLA.swf and http://swfchan.com/11/50709/?Look+up+at+the+sky.s wf compress to 1/3 of their original size. I don't know why, but it seems fairly rare.

>>!///SWFAnts  #ADMIN#  12feb2015(th)12:34  No.17871  SWF  P7R4
>>17859
IMMEDIATE BAN! just kiddin'

Some of the oldest code for this site is a real mess. I usually have a policy of "as long as it works it's fine" in order to not waste too much time just moving code around and combine that with how inexperienced at programming I was seven years ago compared to today things sometimes take a while to understand before edits can be done. Two days ago I finally changed the code that handles downloads from 4chan and swfchan.org (to the archive) to make it more stable and it took pretty long since I had to be careful not to break something in the process. I'm not sure if I would ever dare to make swfchan open source just because I'd probably feel embarrassed.

>>17870
That's quite some work you've put into this. Yeah, it would have been useful 13 years ago back in the days where 2 MiB flashes had small games implemented into them just so you'd have something to do while waiting for the preload of the rest of the flash to finish.




http://boards.swfchan.net/6659/index.shtml
Created: 11/2 -2015 19:28:23 Last modified: 22/12 -2024 02:49:09 Server time: 22/12 -2024 03:15:28