1. A computer-readable recording medium storing therein an information retrieval program that causes a computer to execute: generating a Huffman tree based on an XML tag written in an XML file constituting content, and an appearance frequency of character data exclusive of the XML tag; compressing the XML file using the generated Huffman tree; receiving input of a retrieval condition that includes a retrieval keyword and type information concerning the retrieval keyword; setting, among compression codes indicated by the Huffman tree, a decompression start flag for a compression code that is for an XML start tag related to the type information, the decompression start flag instructing commencement of decompression of a compression code string subsequent to the XML start tag; detecting, in the compressed XML file, the compression code for the XML start tag and for which the decompression start flag has been set at the setting; and decompressing, when at the detecting, the compression code for the XML start tag and for which the decompression start flag has been set is detected, the compression code string subsequent to the XML start tag, using the Huffman tree.