sanity/tahrir — pull request #16 by wangyingang (2012-05-28 09:28:49+00:00)
Title: text compress implementation (Huffman)

please check the test case: tahrir.tools.ShortTextCompressorTest

Maybe we should implement a new class which is self-explanatory. That is, we need to store the frequence table or Huffman tree that is created to store inside of the output byte array. And we also need to design a protocol used to identify the huffman tree data and compressed data. Look this:

http://stackoverflow.com/questions/759707/efficient-way-of-storing-huffman-tree

I hope the class like is:
class Huffman {
public static byte[] compress(String toCompress){....}
public static String deCompress(byte[] toDecompress){....}
}