?? testhuffman.java
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package lab6;/** * * @author Administrator */import java.io.IOException;public class TestHuffman { public static void main(String[] args) throws IOException { /* Process the input source file */ FileProcess fp = new FileProcess(); fp.processFile("HugeFile.html"); /* Three cases: "TinyFile.html", "MidFile.html" and "HugeFile.html" */ /* Get the frequency of each character */ int[] freqArray = fp.getFreq(); /* Initialize a new HuffmanTree */ HuffmanTree tree = new HuffmanTree(); /* Generate the HuffmanTree according to the pass-in frequency */ tree.HUFFMAN(freqArray); /* Print out the resulting representation */ tree.printHuffmanTree(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -