Packagecalista.utils
Classpublic class LZW
InheritanceLZW Inheritance Object

Compresses and decompresses text with the LZW algorithm.



Public Methods
 MethodDefined By
  
compress(source:String):String
[static] Compresses the specified text.
LZW
  
decompress(source:String):String
[static] Decompresses the specified text with the LZW algorithm.
LZW
Method Detail
compress()method
public static function compress(source:String):String

Compresses the specified text.

Example :

         import calista.utils.LZW ;
         
         var source:String = "hello world with LZW algorithm" ;
         
         var compress:String = LZW.compress( source ) ;
         trace("compress : " + compress) ;
         

Parameters

source:String

Returns
String
decompress()method 
public static function decompress(source:String):String

Decompresses the specified text with the LZW algorithm.

Example :

         import calista.utils.LZW ;
         
         var source:String = "hello world with LZW algorithm" ;
         
         var compress:String = LZW.compress( source ) ;
         trace("compress : " + compress) ; // compress : hello worldąith LZW algćČhm
         
         var decompress:String = LZW.decompress( compress ) ;
         trace("decompress : " + decompress) ; // decompress : hello world with LZW algorithm
         

Parameters

source:String

Returns
String