Class ZLencode

java.lang.Object
  extended byZLencode

public class ZLencode
extends java.lang.Object

This class implements the encoding part of the Ziv-Lempel text compression algorithm. Uses the class Trie.


Constructor Summary
ZLencode()
           
 
Method Summary
static java.lang.String fromFile(java.lang.String name)
           
static void main(java.lang.String[] args)
           
static void toFile(java.lang.String name, java.lang.String s)
           
static java.lang.String toString(int n, int b)
           
static java.lang.String ZLencoding(Alphabet alphabet, java.lang.String s)
          Implements ZLcoding().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZLencode

public ZLencode()
Method Detail

ZLencoding

public static java.lang.String ZLencoding(Alphabet alphabet,
                                          java.lang.String s)
Implements ZLcoding().


toString

public static java.lang.String toString(int n,
                                        int b)

fromFile

public static java.lang.String fromFile(java.lang.String name)
                                 throws java.io.IOException
Throws:
java.io.IOException

toFile

public static void toFile(java.lang.String name,
                          java.lang.String s)
                   throws java.io.IOException
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException