A non-transitory computer-readable recording medium storing a program to be executed by a computer, the program comprising:
- storing writing data, in which pattern information on a plurality of patterns is defined, in a storage device;
- acquiring pattern information on a plurality of patterns defined in the writing data which is read from the storage device;
- generating a first table in which each pattern information corresponds to a number of times of using the each pattern information, based on acquired pattern information, for each predetermined region;
- generating a Huffman tree, based on the first table;
- generating a second table in which the each pattern information corresponds to a variable length binary code generated by encoding the each pattern information in such a manner that the larger the number of times of using the each pattern information is, the smaller a value of the variable length binary code is, based on the Huffman tree;
- converting data, which is defined by the writing data, in the predetermined region into a predetermined format using the variable length binary code, based on the second table;
- and
- storing converted data in the predetermined region.