/** * Import a compaced frequency table from the system preferences (In windows from the registry * HKLM/JavaSoft/Prefs/ch/rgw/tools/Compress/StandardTables, in Linux from ~/.prefs) * * @param name Name of the table in the registry. If no table with this name is found, the default * table (TextDeutsch) is returned. * @return the table */ public static int[] useStandardTable(String name) { Preferences pr = Preferences.userNodeForPackage(Huff.class); Preferences node = pr.node("StandardTables"); byte[] res = node.getByteArray(name, TextDeutsch); return HuffmanTree.expandTable(res); }