⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testhuffman.java

📁 这是一个huffmanCode算法
💻 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 + -