Can you compress AMF objects with LZMA?

Go To


I know Flash 11 has native support for handling LZMA compressed swfs, is there a way to use LZMA compression with AMF objects?

2012-04-04 19:00
by Chris


You can use the deflate() and inflate() to get generic compression and decompression. If you want to use this to get LZMA format, you'll need to:

create a ByteArray structured according to the compression format's specification, including the appropriate metadata as well as the compressed data obtained using the deflate format.

Basically, you'll have to learn the structure, write all the header information yourself, then use deflate(). To uncompress, you'll need to read in the header information (readInt(), readShort etc), then use inflate() on the rest to get your date back.

2012-04-04 21:13
by divillysausages