Patent ID: 8018359

Claim:
A method for converting a plurality of bit lengths, each assigned to a plurality of strings, into a plurality of codes respectively having the plurality of bit lengths, comprising: in response to input of the plurality of bit lengths, recording a number of strings assigned each of the bit lengths, a bit length assigned to each of the strings, and a sequence number of each string in a group of strings assigned each of the bit lengths; generating a plurality of base codes on the basis of the numbers of the recorded strings, the plurality of base codes each being a code used as a base for codes having the same one of the bit lengths; and generating the plurality of codes by performing in parallel a plurality of processes respectively for the plurality of strings, one of the processes for each of the strings being based on: one of the plurality of generated base codes, the one of the plurality of generated base codes having the bit length assigned to the string, and the sequence number for the string in the group of the strings assigned the bit length.