0001 PFCForest* initForest() { //PFC编码森林初始化 0002 PFCForest* forest = new PFCForest; //首先创建空森林,然后 0003 for ( int i = 0; i < N_CHAR; i++ ) { //对每一个可打印字符[0x20, 0x80) 0004 forest->insert ( i, new PFCTree() ); //创建一棵对应的PFC编码树,初始时其中 0005 ( *forest ) [i]->insert ( 0x20 + i ); //只包含对应的一个(叶、根)节点 0006 } 0007 return forest; //返回包含N_CHAR棵树的森林,其中每棵树各包含一个字符 0008 }