I still haven't figured it out, but I found some things. I wrote a
small class that removes the header and the crc32/length stuff at the
end. Only the remaining data still can't be uncompressed.

So I looked at data compressed with compress() and instantly noticed
that it always begins with a short integer (0x78da). There also seems
to be some significance to the two (possibly four) bytes at the end
but I can't figure it out. Adding 0x78da alone doesn't make it work.

I'm out of ideas, does anybody else have any? The class I wrote is
attached to this email. I really think this would be useful to
everyone, as you could compress any binary file and decompress it
within flash. As far as I can tell there's no way to do this right
now.

On 8/9/06, Max <[EMAIL PROTECTED]> wrote:

It seems your right, I tried removing the header info already, but it looks 
more complex than I thought. I can actually see the original filename in the 
header. After all that experimenting with a hex editor I forgot to actually 
check the file itself. Why is it every time I post on a forum or mailing list 
about a problem I could've always solved it myself but I overlooked something 
obvious?

I'll get right on this. Tomorrow. Thanks Nicolas, this is not the first time 
you saved me.



On 8/9/06, Nicolas Cannasse  < [EMAIL PROTECTED]> wrote:
>   > I'm writing a program that processes a huge 4MB binary file in Flash 9.
> > Thing is, if I compress it (specifically with gzip) I can lower the size to
> > 1.67MB. My problem is that I can't uncompress it using ByteArray's
> > uncompress() feature on the gzipped file.
> >
> > The documentation for compress() says that it uses zlib compression.
> > Zlib is
> > a compression library that is based on gzip. The even use the same
> > algorithim, DEFLATE. I'm sure there's a way to do this.
> >
> > Does anybody have any ideas? Since they're roughly the same it seems like
> > all you'd need is to change some header values, but I can't find anything
> > myself.
>
> There's a GZ header before the DEFLATE stream, see
> http://www.faqs.org/rfcs/rfc1952.html
>
> Nicolas
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
>  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to