I downloaded the Flex 3 Builder Pro Trial. One of the
features I was waiting for is the compression of Strings through
ByteArrays using CompressionAlgorithm.DEFLATE and
CompressionAlgorithm.ZLIB. Now I can see CompressionAlgorithm in
the documentation that ships with Flex 3 only, but when I use
ByteArray.compress() in ActionScript, it does not expect the
parameter CompressionAlgorithm.DEFLATE or
CompressionAlgorithm.ZLIB. Instead it expects 0 parameters like in
Flex 2. Moreover, the class CompressionAlgorithm does not exists at
I checked Windows --> Preferences --> Flex -->
Installed Flex SDKs and it uses Flex 3.
Yes you are right, I didn't read the documentation properly.
After reading it more closely I see that the difference
between the two algorithms is that CompressionAlgorithm.ZLIB adds
the metadata to the compressed ByteArray and
CompressionAlgorithm.DEFLATE does not. In other words, in a Flex 3
application you have to add the metadata manually, for example
before sending a compressed XML-request to the server.
Now I have problems understanding why
CompressionAlgorithm.ZLIB is only available in AIR