Patent ID: 7880648

Claim:
A computer-readable recording medium storing therein an information processing program that causes a computer to execute: storing, to a storing unit, an aggregate of nodes that respectively store therein a pointer to an upper node and 2 n pointers to at least one among a leaf and a lower node and respectively have 2 n branches that respectively extend to a lower node (where, n is a natural number and n≧2), the aggregate having k layers of nodes (where, k is a natural number and k≧2) and 2 n(i-1) nodes in an ith layer (where, i is a natural number and 1≦i≦k); obtaining a totaling result of appearance frequencies of character codes described in a file; classifying the character codes by layer, based on the totaling result obtained at the obtaining and according to appearance probabilities P of the character codes (where, P is 1/2 ni ≦P<1/2 n(i-1) and when i=1, P is 1/2 ni ≦P<1 and when i=n, P is P<1/2 n(i-1) ); calculating, based on a quantity of character codes in the ith layer classified at the classifying and for the ith layer, a quantity of pointers pointing to leaves, and based on the quantity of pointers in the ith layer pointing to leaves, and further calculating a number of times nodes in the ith layer are used and a quantity of pointers pointing to lower nodes that, as link destinations, are nodes in an (i+1)th layer; generating, based on a calculation result at the calculating, a 2 n -branching Huffman tree; and converting into a 2 m -branching node-less Huffman tree (where, m=n×k), the 2 n -branching Huffman tree generated at the generating of the 2 n -branching Huffman tree, the 2 m -branching node-less Huffman tree being stored to the storing unit.